differs()
differs(string $str = null, string $field, array $data) : boolean
The value does not match another field in $data.
Parameters
string | $str | |
string | $field | |
array | $data | Other field/value pairs |
Validation Rules.
is_unique(string $str = null, string $field, array $data) : boolean
Checks the database to see if the given value is unique. Can ignore a single record by field/value to make it useful during record updates.
Example: is_unique[table.field,ignore_field,ignore_value] is_unique[users.email,id,5]
string | $str | |
string | $field | |
array | $data |
required_with( $str = null, string $fields, array $data) : boolean
The field is required when any of the other required fields are present in the data.
Example (field is required when the password field is present):
required_with[password]
$str | ||
string | $fields | List of fields that we should check if present |
array | $data | Complete list of fields from the form |
required_without( $str = null, string $fields, array $data) : boolean
The field is required when all of the other fields are present in the data but not required.
Example (field is required when the id or email field is missing):
required_without[id,email]
$str | ||
string | $fields | |
array | $data |