@@ -897,15 +897,11 @@ Rule Parameter Description
897897======================= ========== ============================================= ===================================================
898898alpha No Fails if field has anything other than
899899 alphabetic characters in ASCII.
900- alpha_space No Fails if field contains anything other than
901- alphabetic characters or spaces in ASCII.
902900alpha_dash No Fails if field contains anything other than
903901 alphanumeric characters, underscores or
904902 dashes in ASCII.
905903alpha_numeric No Fails if field contains anything other than
906904 alphanumeric characters in ASCII.
907- alpha_numeric_space No Fails if field contains anything other than
908- alphanumeric or space characters in ASCII.
909905alpha_numeric_punct No Fails if field contains anything other than
910906 alphanumeric, space, or this limited set of
911907 punctuation characters: ``~ `` (tilde),
@@ -916,6 +912,10 @@ alpha_numeric_punct No Fails if field contains anything other than
916912 ``_ `` (underscore), ``+ `` (plus),
917913 ``= `` (equals), ``| `` (vertical bar),
918914 ``: `` (colon), ``. `` (period).
915+ alpha_numeric_space No Fails if field contains anything other than
916+ alphanumeric or space characters in ASCII.
917+ alpha_space No Fails if field contains anything other than
918+ alphabetic characters or spaces in ASCII.
919919decimal No Fails if field contains anything other than
920920 a decimal number. Also accepts a ``+ `` or
921921 ``- `` sign for the number.
@@ -964,10 +964,10 @@ not_in_list Yes Fails if field is within a predetermined
964964 list.
965965numeric No Fails if field contains anything other than
966966 numeric characters.
967- regex_match Yes Fails if field does not match the regular ``regex_match[/regex/] ``
968- expression.
969967permit_empty No Allows the field to receive an empty array,
970968 empty string, null or false.
969+ regex_match Yes Fails if field does not match the regular ``regex_match[/regex/] ``
970+ expression.
971971required No Fails if the field is an empty array, empty
972972 string, null or false.
973973required_with Yes The field is required when any of the other ``required_with[field1,field2] ``
@@ -980,31 +980,6 @@ timezone No Fails if field does not match a timezone
980980 per `timezone_identifiers_list() `_
981981valid_base64 No Fails if field contains anything other than
982982 valid Base64 characters.
983- valid_json No Fails if field does not contain a valid JSON
984- string.
985- valid_email No Fails if field does not contain a valid
986- email address.
987- valid_emails No Fails if any value provided in a comma
988- separated list is not a valid email.
989- valid_ip Yes Fails if the supplied IP is not valid. ``valid_ip[ipv6] ``
990- Accepts an optional parameter of ``ipv4 `` or
991- ``ipv6 `` to specify an IP format.
992- valid_url No Fails if field does not contain (loosely) a
993- URL. Includes simple strings that could be
994- hostnames, like "codeigniter".
995- **Normally, ** ``valid_url_strict `` **should
996- be used. **
997- valid_url_strict Yes Fails if field does not contain a valid URL. ``valid_url_strict[https] ``
998- You can optionally specify a list of valid
999- schemas. If not specified, ``http,https ``
1000- are valid. This rule uses PHP's
1001- ``FILTER_VALIDATE_URL ``.
1002- valid_date Yes Fails if field does not contain a valid date. ``valid_date[d/m/Y] ``
1003- Any string that `strtotime() `_ accepts is
1004- valid if you don't specify an optional
1005- parameter that matches a date format.
1006- **So it is usually necessary to specify
1007- the parameter. **
1008983valid_cc_number Yes Verifies that the credit card number matches ``valid_cc_number[amex] ``
1009984 the format used by the specified provider.
1010985 Current supported providers are:
@@ -1025,6 +1000,31 @@ valid_cc_number Yes Verifies that the credit card number matches
10251000 Scotiabank Scotia Card (``scotia ``),
10261001 BMO ABM Card (``bmoabm ``),
10271002 HSBC Canada Card (``hsbc ``)
1003+ valid_date Yes Fails if field does not contain a valid date. ``valid_date[d/m/Y] ``
1004+ Any string that `strtotime() `_ accepts is
1005+ valid if you don't specify an optional
1006+ parameter that matches a date format.
1007+ **So it is usually necessary to specify
1008+ the parameter. **
1009+ valid_email No Fails if field does not contain a valid
1010+ email address.
1011+ valid_emails No Fails if any value provided in a comma
1012+ separated list is not a valid email.
1013+ valid_ip Yes Fails if the supplied IP is not valid. ``valid_ip[ipv6] ``
1014+ Accepts an optional parameter of ``ipv4 `` or
1015+ ``ipv6 `` to specify an IP format.
1016+ valid_json No Fails if field does not contain a valid JSON
1017+ string.
1018+ valid_url No Fails if field does not contain (loosely) a
1019+ URL. Includes simple strings that could be
1020+ hostnames, like "codeigniter".
1021+ **Normally, ** ``valid_url_strict `` **should
1022+ be used. **
1023+ valid_url_strict Yes Fails if field does not contain a valid URL. ``valid_url_strict[https] ``
1024+ You can optionally specify a list of valid
1025+ schemas. If not specified, ``http,https ``
1026+ are valid. This rule uses PHP's
1027+ ``FILTER_VALIDATE_URL ``.
10281028======================= ========== ============================================= ===================================================
10291029
10301030.. note :: You can also use any native PHP functions that return boolean and
0 commit comments