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
| color | HTML color (#fff or #fafbfc, '#' is optional) | None |
37
+
| contains | Field must contain (case sensitive) | comma separated list of strings |
37
38
| cvv | Credit card cvv number | None |
38
39
| date | Loosely formatted date (Y-M-D) | None |
39
40
| dateISO | Strictly formatted ISO Date (YYYY-MM-DD) | None |
40
41
| datetime | Loosely formatted date (Y-M-D) followed by time format | None |
41
42
| day_month_year | Loosely formatted date (D-M-Y) | None |
42
43
| domain | Valid domain | None |
43
44
| email | Valid email | None |
45
+
| ends_with | Field must end with (case sensitive) | comma separated list of strings |
44
46
| enum | MySQL enum value, case insensitive | comma separated list of identifiers<br>**Example:** enum:Get,Post,Put,Delete |
45
47
| enum_exact | MySQL enum value, case sensitive | comma separated list of identifiers<br>**Example:** enum:ssl,tls |
48
+
| icontains | Field must contain (case insensitive) | comma separated list of strings |
46
49
| integer | Whole number, no fractional part | None |
50
+
| istarts_with | Field must start with (case insensitive) | comma separated list of strings |
47
51
| maxlength | Length must be greater or equal | Optional length, else MySQL limit |
48
52
| maxvalue | Value must be greater or equal | value, required |
49
53
| minlength | Must be less than or equal | number, default field size |
@@ -52,6 +56,7 @@ foreach ($validationErrors as $field => $fieldErrors)
52
56
| month_year | Loosely formatted Month Year | None |
53
57
| number | Floating point number or whole number | None |
54
58
| required | Field is required, can't be null or blank, 0 is OK | None |
59
+
| starts_with | Field must start with (case sensitive) | comma separated list of strings |
55
60
| time | Time (ampm or military), : separators | None |
56
61
| unique | Column must be a unique value | See Below |
57
62
| url | Valid URL (ftp, http, etc) | None |
@@ -83,7 +88,7 @@ You want the name to be unique for a specific type and division: *unique:type,sh
83
88
## Optional Validation
84
89
You may need to do additional checks for a specific record type. A second parameter can be passed to the contructor which would represent the original values of the record.
85
90
86
-
You can also pass an optional method to validate to perform more complex validation. By default, insert, update, and delete are standard methods that are used by the \App\Controller\Record class will use.
91
+
You can also pass an optional method to validate to perform more complex validation. If you use an optional method, the validator will not perform the standard validations unless you specifically call the validate() method again without the optional method parameter.
0 commit comments