You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/libraries/validation.rst
+18-19Lines changed: 18 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -660,31 +660,30 @@ alpha_dash No Fails if field contains anything other than
660
660
alpha_numeric No Fails if field contains anything other than alpha-numeric characters or numbers.
661
661
alpha_numeric_space No Fails if field contains anything other than alpha-numeric characters, numbers or space.
662
662
decimal No Fails if field contains anything other than a decimal number.
663
-
differs Yes Fails if field does not differ from the one in the parameter. differs[field_name]
664
-
equals Yes Fails if field is not exactly the parameter value.
665
-
exact_length Yes Fails if field is not exactly the parameter value in length. One or more comma-separated values. exact_length[5] or exact_length[5,8,12]
666
-
greater_than Yes Fails if field is less than or equal to the parameter value or not numeric. greater_than[8]
667
-
greater_than_equal_to Yes Fails if field is less than the parameter value, or not numeric. greater_than_equal_to[5]
668
-
in_list Yes Fails if field is not within a predetermined list. in_list[red,blue,green]
663
+
differs Yes Fails if field does not differ from the one in the parameter. differs[field_name]
664
+
exact_length Yes Fails if field is not exactly the parameter value. One or more comma-separated values. exact_length[5] or exact_length[5,8,12]
665
+
greater_than Yes Fails if field is less than or equal to the parameter value or not numeric. greater_than[8]
666
+
greater_than_equal_to Yes Fails if field is less than the parameter value, or not numeric. greater_than_equal_to[5]
667
+
if_exist No If this rule is present, validation will only return possible errors if the field key exists,
668
+
regardless of its value.
669
+
in_list Yes Fails if field is not within a predetermined list. in_list[red,blue,green]
669
670
integer No Fails if field contains anything other than an integer.
670
671
is_natural No Fails if field contains anything other than a natural number: 0, 1, 2, 3, etc.
671
672
is_natural_no_zero No Fails if field contains anything other than a natural number, except zero: 1, 2, 3, etc.
672
-
less_than Yes Fails if field is greater than or equal to the parameter value or not numeric. less_than[8]
673
-
less_then_equal_to Yes Fails if field is greater than the parameter value or not numeric. less_than_equal_to[8]
674
-
matches Yes The value must match the value of the field in the parameter. matches[field]
675
-
max_length Yes Fails if field is longer than the parameter value. max_length[8]
676
-
min_length Yes Fails if field is shorter than the parameter value. min_length[3]
677
-
not_equals Yes Fails if field is exactly the parameter value.
673
+
is_unique Yes Checks if this field value exists in the database. Optionally set a is_unique[table.field,ignore_field,ignore_value]
674
+
column and value to ignore, useful when updating records to ignore itself.
675
+
less_than Yes Fails if field is greater than or equal to the parameter value or not numeric. less_than[8]
676
+
less_then_equal_to Yes Fails if field is greater than the parameter value or not numeric. less_than_equal_to[8]
677
+
matches Yes The value must match the value of the field in the parameter. matches[field]
678
+
max_length Yes Fails if field is longer than the parameter value. max_length[8]
679
+
min_length Yes Fails if field is shorter than the parameter value. min_length[3]
678
680
numeric No Fails if field contains anything other than numeric characters.
679
-
regex_match Yes Fails if field does not match the regular expression. regex_match[/regex/]
680
-
if_exist No If this rule is present, validation will only return possible errors if the field key exists,
681
-
regardless of its value.
681
+
regex_match Yes Fails if field does not match the regular expression. regex_match[/regex/]
682
682
permit_empty No Allows the field to receive an empty array, empty string, null or false.
683
683
required No Fails if the field is an empty array, empty string, null or false.
684
-
required_with Yes The field is required when any of the other required fields are present in the data. required_with[field1,field2]
685
-
required_without Yes The field is required when all of the other fields are present in the data but not required. required_without[field1,field2]
686
-
is_unique Yes Checks if this field value exists in the database. Optionally set a is_unique[table.field,ignore_field,ignore_value]
687
-
column and value to ignore, useful when updating records to ignore itself.
684
+
required_with Yes The field is required when any of the other required fields are present in the data. required_with[field1,field2]
685
+
required_without Yes The field is required when all of the other fields are present in the data but not required. required_without[field1,field2]
686
+
string No A generic alternative to the alpha* rules that confirms the element is a string
688
687
timezone No Fails if field does match a timezone per ``timezone_identifiers_list``
689
688
valid_base64 No Fails if field contains anything other than valid Base64 characters.
690
689
valid_json No Fails if field does not contain a valid JSON string.
0 commit comments