-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the require rule will accept null values (BREAKING CHANGES)
feat: add notNull rule before this version, a field that was present but with a null value caught the attention of the 'required' rule. Now with this fix the 'required' rule will only check if a certain key is present in the params or payload.
- Loading branch information
1 parent
dc4c5d7
commit 9fdb238
Showing
4 changed files
with
74 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
<?php | ||
return [ | ||
'required' => 'The field %s is required', | ||
'empty' => 'The field %s cannot be empty', | ||
'slug' => 'The field %s is not a valid slug', | ||
'minLength' => 'The field %s must contain more than %d characters', | ||
'maxLength' => 'The field %s must contain less than %d characters', | ||
'betweenLength' => 'The field %s must contain between %d and %d characters', | ||
'datetime' => 'The field %s must be a valid date (%s)', | ||
'notEqual' => 'The field %s must be equal to %s', | ||
'email' => 'The field %s must be a valid email address', | ||
'integer' => 'The field %s must be a valid number', | ||
'required' => 'The field %s is required', | ||
'empty' => 'The field %s cannot be empty', | ||
'slug' => 'The field %s is not a valid slug', | ||
'minLength' => 'The field %s must contain more than %d characters', | ||
'maxLength' => 'The field %s must contain less than %d characters', | ||
'betweenLength' => 'The field %s must contain between %d and %d characters', | ||
'datetime' => 'The field %s must be a valid date (%s)', | ||
'notEqual' => 'The field %s must be equal to %s', | ||
'email' => 'The field %s must be a valid email address', | ||
'integer' => 'The field %s must be a valid number', | ||
'float' => 'The field %s must be a valid float', | ||
'url' => 'The field %s must be a valid URL', | ||
'match' => 'The field %s must be equal to %s', | ||
'between' => "The field %s must be between %d and %d", | ||
'betweenStrict' => "The field %s must be strict between %d and %d", | ||
'url' => 'The field %s must be a valid URL', | ||
'match' => 'The field %s must be equal to %s', | ||
'between' => "The field %s must be between %d and %d", | ||
'betweenStrict' => "The field %s must be strict between %d and %d", | ||
'array' => "Thr field %s must be an array", | ||
'boolean' => "The field %s must be a boolean", | ||
'patternMatch' => "The field %s must follow the pattern", | ||
'alphaNumerical' => "The field %s must be composed of alpha numerical characters" | ||
'alphaNumerical' => "The field %s must be composed of alpha numerical characters", | ||
'notNull' => 'The field%s cannot be null' | ||
]; |
This file contains 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
This file contains 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