rules
Table of Contents
Classes
- BaseRule
- A base helper class for rules.
- AllInArrayRule
- Checks each value of an array is one of the allowed values
- AllMatchRule
- All field values must match (e.g. password1 and password2 must match)
- AllUniqueRule
- All field values must match (e.g. password1 and password2 must match)
- BinaryRule
- Checks that a value is binary; either a '1' or a '0'.
- DateRangeRule
- Checks that a date range is valid.
- EmailRule
- Validate email, commonly used characters only
- InArrayRule
- Checks a value is one of the allowed values
- Ipv4AddrOrCidrRule
- Checks that a value is a valid IPv4 address or CIDR block
- Ipv4AddrRule
- Checks that a value is a valid IPv4 address
- Ipv4CidrRule
- Checks that a value is a valid IPv4 CIDR block
- LengthRule
- Checks the length of a string is within an allowed range.
- MysqlDateRule
- Checks if a value is a date in MySQL format (YYYY-MM-DD)
- MysqlDateTimeRule
- Checks if a value is a datetime in MySQL format (YYYY-MM-DD HH:MM:SS)
- MysqlTimeRule
- Checks if a value is a time in MySQL format (HH:MM:SS)
- NumericRule
- Checks that a value is numeric (integral or decimal)
- OneRequiredRule
- At least one value must be specified (e.g. one of email/phone/mobile).
- PasswordRule
- Validate password by length, type of characters
- PhoneRule
- Checks if a phone number is valid.
- PositiveIntRule
- Checks if a value is a positive integer
- ProseTextRule
- Checks whether a string is made up of the kinds of characters that make up prose
- RangeRule
- Checks that a value is numeric (integral or decimal) and within a given inclusive range.
- RegexRule
- Checks that a value matches a regular expression
- RequiredRule
- A special rule for required validations.