Skip to content

Commit cb39e7e

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.6
2 parents 457a1e7 + cd1f3f5 commit cb39e7e

File tree

3 files changed

+40
-36
lines changed

3 files changed

+40
-36
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"phpunit/phpcov": "^9.0.2",
3333
"phpunit/phpunit": "^10.5.16",
3434
"predis/predis": "^1.1 || ^2.0",
35-
"rector/rector": "1.1.1",
35+
"rector/rector": "1.2.0",
3636
"vimeo/psalm": "^5.0"
3737
},
3838
"replace": {

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
__DIR__ . '/tests/system/Filters/fixtures',
9494
__DIR__ . '/tests/_support/Commands/Foobar.php',
9595
__DIR__ . '/tests/_support/View',
96+
__DIR__ . '/tests/system/View/Views',
9697

9798
YieldDataProviderRector::class,
9899

user_guide_src/source/libraries/validation.rst

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -897,15 +897,11 @@ Rule Parameter Description
897897
======================= ========== ============================================= ===================================================
898898
alpha 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.
902900
alpha_dash No Fails if field contains anything other than
903901
alphanumeric characters, underscores or
904902
dashes in ASCII.
905903
alpha_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.
909905
alpha_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.
919919
decimal No Fails if field contains anything other than
920920
a decimal number. Also accepts a ``+`` or
921921
``-`` sign for the number.
@@ -940,9 +940,11 @@ in_list Yes Fails if field is not within a predetermined
940940
integer No Fails if field contains anything other than
941941
an integer.
942942
is_natural No Fails if field contains anything other than
943-
a natural number: 0, 1, 2, 3, etc.
943+
a natural number: ``0``, ``1``, ``2``, ``3``
944+
, etc.
944945
is_natural_no_zero No Fails if field contains anything other than
945-
a natural number, except zero: 1, 2, 3, etc.
946+
a natural number, except zero: ``1``, ``2``,
947+
``3``, etc.
946948
is_not_unique Yes Checks the database to see if the given value ``is_not_unique[table.field,where_field,where_value]``
947949
exists. Can ignore records by field/value to
948950
filter (currently accept only one filter).
@@ -964,47 +966,22 @@ not_in_list Yes Fails if field is within a predetermined
964966
list.
965967
numeric No Fails if field contains anything other than
966968
numeric characters.
967-
regex_match Yes Fails if field does not match the regular ``regex_match[/regex/]``
968-
expression.
969969
permit_empty No Allows the field to receive an empty array,
970970
empty string, null or false.
971+
regex_match Yes Fails if field does not match the regular ``regex_match[/regex/]``
972+
expression.
971973
required No Fails if the field is an empty array, empty
972974
string, null or false.
973975
required_with Yes The field is required when any of the other ``required_with[field1,field2]``
974976
fields is not `empty()`_ in the data.
975977
required_without Yes The field is required when any of the other ``required_without[field1,field2]``
976978
fields is `empty()`_ in the data.
977-
string No A generic alternative to the alpha* rules
979+
string No A generic alternative to the **alpha*** rules
978980
that confirms the element is a string
979981
timezone No Fails if field does not match a timezone
980982
per `timezone_identifiers_list()`_
981983
valid_base64 No Fails if field contains anything other than
982984
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.**
1008985
valid_cc_number Yes Verifies that the credit card number matches ``valid_cc_number[amex]``
1009986
the format used by the specified provider.
1010987
Current supported providers are:
@@ -1025,11 +1002,37 @@ valid_cc_number Yes Verifies that the credit card number matches
10251002
Scotiabank Scotia Card (``scotia``),
10261003
BMO ABM Card (``bmoabm``),
10271004
HSBC Canada Card (``hsbc``)
1005+
valid_date Yes Fails if field does not contain a valid date. ``valid_date[d/m/Y]``
1006+
Any string that `strtotime()`_ accepts is
1007+
valid if you don't specify an optional
1008+
parameter that matches a date format.
1009+
**So it is usually necessary to specify
1010+
the parameter.**
1011+
valid_email No Fails if field does not contain a valid
1012+
email address.
1013+
valid_emails No Fails if any value provided in a comma
1014+
separated list is not a valid email.
1015+
valid_ip Yes Fails if the supplied IP is not valid. ``valid_ip[ipv6]``
1016+
Accepts an optional parameter of ``ipv4`` or
1017+
``ipv6`` to specify an IP format.
1018+
valid_json No Fails if field does not contain a valid JSON
1019+
string.
1020+
valid_url No Fails if field does not contain (loosely) a
1021+
URL. Includes simple strings that could be
1022+
hostnames, like "codeigniter".
1023+
**Normally,** ``valid_url_strict`` **should
1024+
be used.**
1025+
valid_url_strict Yes Fails if field does not contain a valid URL. ``valid_url_strict[https]``
1026+
You can optionally specify a list of valid
1027+
schemas. If not specified, ``http,https``
1028+
are valid. This rule uses PHP's
1029+
``FILTER_VALIDATE_URL``.
10281030
======================= ========== ============================================= ===================================================
10291031

10301032
.. note:: You can also use any native PHP functions that return boolean and
10311033
permit at least one parameter, the field data to validate.
1032-
The Validation library **never alters the data** to validate.
1034+
1035+
.. important:: The Validation library **never alters the data** to validate.
10331036

10341037
.. _timezone_identifiers_list(): https://www.php.net/manual/en/function.timezone-identifiers-list.php
10351038
.. _strtotime(): https://www.php.net/manual/en/function.strtotime.php

0 commit comments

Comments
 (0)