laravel-validator | Laravel Validation Service | Validation library
kandi X-RAY | laravel-validator Summary
kandi X-RAY | laravel-validator Summary
Laravel Validation Service
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse validation rules
- Returns true if the data passes validation .
- Get validation rules .
- Checks if the validator passes the rule .
- Return array representation
- Set the data .
- Convert to json
- Returns the message bag .
laravel-validator Key Features
laravel-validator Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-validator
QUESTION
I am using the L5 repository and it has the validator package (https://github.com/andersao/laravel-validator) but I am have problems to do the validation of the unique fields on update it, anyone to help me???
******the example bellow I tried in this way on RULE_UPDATE but no success..
((((((FIELDS I WANT TO VALIDATE : people_id, email BECAUSE THESE ARE UNIQUE ONLY FOR REST OF THE USERS, NOT TO THIS CURRENT USER THAT ITS UPDATING )))))))
calling the validation in the UserService.php:
use Prettus\Validator\Contracts\ValidatorInterface;
...ANSWER
Answered 2018-Mar-01 at 20:08While updating you need to force a unique rule to Ignore Given ID
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-validator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page