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
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
- Added additional available validation classes.
- "Description" column had a mixture of actual descriptions, and often times a copy/paste of the validation failure message. Revised to more consistently be a description of the rule rather than list out the validation failure message.
- Personal opinion is that a description of rule is more appropriate for a "developer" oriented guide, although also see value in providing the validation failure message as part of guide.
- For some rules, provided the regex that the value must match against.
- For some rules, provided the validation failure message.
- Clearly indicated that "required-entry" and "validate-no-empty" have the same validation test, but that each has a different validation failure message.
|`alphanumeric`| Allows letters, numbers, spaces or underscores only. |
362
-
|`integer`| Enter a positive or negative non-decimal number. |
363
-
|`letters-only`| Allows letters only. For example, `abcABC`. |
362
+
|`integer`| Allows a positive or negative non-decimal number. |
363
+
|`ipv4`| Allows a valid IP v4 address. |
364
+
|`ipv6`| Allows a valid IP v6 address. |
365
+
|`letters-only`| Allows letters only. For example, `abcABC`. |
366
+
|`letters-with-basic-punc`| Allows letters or punctuation only.<br>Must pass the following expression: `/^[a-z\-.,()\u0027\u0022\s]+$/i`. |
367
+
|`no-marginal-whitespace`| Disallows white spaces at the start or end of the value. |
364
368
|`no-whitespace`| Disallows white spaces. |
365
-
|`time`| Allows a valid time in 24-hour format, between 00:00 and 23:59. For example `15`, `15:05` or `15:05:48`. |
366
-
|`time12h`| Allows a valid time in 12-hour format, between 12:00 am and 11:59:59 pm. For example `3 am`, `11:30 pm`, `02:15:00 pm`. |
367
-
|`validate-no-html-tags`| HTML tags are not allowed. |
368
-
|`validate-select`| Select an option. |
369
-
|`validate-no-empty`| Empty Value |
370
-
|`validate-alphanum-with-spaces`| Use letters (a-z or A-Z), numbers (0-9), or spaces only in this field. |
371
-
|`validate-data`| Use letters (a-z or A-Z), numbers (0-9), or underscores (_) only in this field. The first character should be a letter. |
372
-
|`validate-street`| Use letters (a-z or A-Z), numbers (0-9), spaces, and “#” only in this field. |
373
-
|`validate-phoneStrict`| Enter a valid phone number. For example, (123) 456-7890 or 123-456-7890. |
374
-
|`validate-phoneLax`| Enter a valid phone number. For example, (123) 456-7890 or 123-456-7890. |
375
-
|`validate-fax`| Enter a valid fax number. For example, 123-456-7890. |
376
-
|`validate-email`| Enter a valid email address. For example, johndoe@domain.com. |
377
-
|`validate-emailSender`| Enter a valid email address. For example, johndoe@domain.com. |
378
-
|`validate-password`| Enter 6 or more characters. Leading and trailing spaces will be ignored. |
379
-
|`validate-admin-password`| Enter 7 or more characters, using both numeric and alphabetic. |
380
-
|`validate-url`| Enter a valid URL. Protocol is required (http://, https:// or ftp://). |
381
-
|`validate-clean-url`| Enter a valid URL. For example, http://www.example.com or www.example.com.|
382
-
|`validate-xml-identifier`| Enter a valid XML-identifier. For example, something_1, block5, id-4. |
383
-
|`validate-ssn`| Enter a valid social security number. For example, 123-45-6789. |
384
-
|`validate-zip-us`| Enter a valid ZIP code. For example, 90602 or 90602-1234. |
385
-
|`validate-date-au`| Use this date format: dd/mm/yyyy. For example, 17/03/2006 for the 17th of March, 2006. |
386
-
|`validate-currency-dollar`| Enter a valid $ amount. For example, $100.00. |
369
+
|`time`| Allows a valid time in 24-hour format, between 00:00 and 23:59. For example `15`, `15:05` or `15:05:48`. |
370
+
|`time12h`| Allows a valid time in 12-hour format, between 12:00 am and 11:59:59 pm. For example `3 am`, `11:30 pm`, `02:15:00 pm`. |
371
+
|`mobileUK`| Allows a (UK) mobile phone number. |
372
+
|`phoneUS`| Allows a (US) phone number. |
373
+
|`phoneUK`| Allows a (UK) phone number. |
374
+
|`required-entry`| Disallows an empty value (equivalent validation as `validate-no-empty`).<br>Validation failure message: "This is a required field." |
375
+
|`validate-no-html-tags`| Disallows usage of HTML tags. |
376
+
|`validate-select`| Enforces a that the select option chosen not have a `null` value, string value of `none`, or string length of 0. |
377
+
|`validate-no-empty`| Disallows an empty value (equivalent validation as `requried-entry`).<br>Validation failure message: "Empty value." |
378
+
|`validate-alphanum-with-spaces`| Allows usage of letters (a-z or A-Z), numbers (0-9), or spaces only. |
379
+
|`validate-data`| Allows usage of letters (a-z or A-Z), numbers (0-9), or underscores (_) only.<br>The first character must be a letter.<br>(Must match expression: `/^[A-Za-z]+[A-Za-z0-9_]+$/`)<br>Validation failure message: "Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter." |
380
+
|`validate-street`| Allows usage of letters (a-z or A-Z), numbers (0-9), spaces, and “#” only. |
381
+
|`validate-phoneStrict`| Allows a valid phone number. For example, (123) 456-7890 or 123-456-7890. |
382
+
|`validate-phoneLax`| Allows a valid phone number. For example, (123) 456-7890 or 123-456-7890. |
383
+
|`validate-fax`| Allows a valid fax number. For example, 123-456-7890. |
384
+
|`validate-email`| Allows a valid email address. For example, johndoe@domain.com. |
385
+
|`validate-emailSender`| Allows a valid email address. For example, johndoe@domain.com. |
386
+
|`validate-password`| Allows 6 or more characters. Leading and trailing spaces will be ignored. |
387
+
|`validate-admin-password`| Allows 7 or more characters, using both numeric and alphabetic. |
388
+
|`validate-url`| Allows a valid URL. Protocol is required (http://, https:// or ftp://). |
389
+
|`validate-clean-url`| Allows a valid URL. For example, http://www.example.com or www.example.com.|
390
+
|`validate-xml-identifier`| Allows a valid XML-identifier. For example, something_1, block5, id-4. |
391
+
|`validate-ssn`| Allows a valid social security number. For example, 123-45-6789. |
392
+
|`validate-zip-us`| Allows a valid (US) ZIP code. For example, 90602 or 90602-1234. |
393
+
|`validate-date-au`| Enforces the following date format: dd/mm/yyyy. For example, 17/03/2006 for the 17th of March, 2006. |
394
+
|`validate-currency-dollar`| Allows a valid (dollar) amount. For example, $100.00. |
395
+
|`vinUS`| Allows (US) vehicle identification number (VIN) value. |
0 commit comments