-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Proposal to add two new rule to validation #3936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allow passing multiple gaurds to the auth middleware
Set the default driver from the Authenticate middleware
Adds config for persistent connections, SASL authentication, and custom options
[5.3] Add config for new Memcached features
…castleman/laravel into tomcastleman-feature/session-store-config
[5.3] Enabled MySQL "strict" mode by default
The commit laravel/framework@586bffa added support for sslmode in PostgresConnector.php and sslmode has been around since postgres version 9.1 (2011). This change makes it possible to specify sslmode from the config file. Also serves as documentation to other developers so they don't have to dive deep into the code to figure out that it's posible to set this option. The posible values for sslmode are: disable, allow, prefer, require, verify-ca, verify-full The default value is "prefer". http://www.postgresql.org/docs/9.5/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION
[5.3] Add "sslmode" setting for PostgreSQL connection
Applied fixes from StyleCI
[5.3] Remove extra whitespace in config/cache.php
Change .env PUSHER_* params order
Minor change to stay consistent
Sorted the Application Service Providers alphabetically
Add web.config for IIS
Adding description for default inspire command
Add fallback sans-serif font in case the custom font fails to load
Add missing translation for `mimetypes` validation
Lang Alphabetical Order
Environment configuration for HTTPS only cookie
[5.3] Map API routes before Web routes
This was referenced Sep 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.The "unacceptable" rule
In some projects, depending on the type of users who use the system. It is necessary to use a feature that is in the form of polymorphism, for example, fields such as "activated" or "role" in the user interface is unacceptable, but in the "senior manager" should be accepted.
In the current case for it, we use the attribute "fillable" in models for filtering inputs, we can use "only" and "except" in the controller. But the main filtering should to be done at the "validation", is not available!
As is evident, in version 5.3 is a rule called "nullable" added to Laravel.
But more importantly, there should be a rule known as "unacceptable", As its name suggests That is refused entry, "unacceptable" fields. To the principles of validation and controller met in this case.
2. Polymorphism "unique" rule
In the current case, validation by "unique" rule, Regardless the type of method is request. One of the common problems of this rule, non-compliance with the Update method. This method needs to be smart. It is not hard. considering methods of "PUT" and "PATCH" a polymorphism "unique" rule to be defined. To meet this suggestion in standard mode or "restFul" only need to "context" and "route".