Method |
Description |
|
addRules ( array $rules, string $ruleset = null ) |
Add rules to the existing rules or ruleset, overriding any existing. |
|
getDefaultRules ( ) : array |
Get the default ruleset for any event. Will first search to see if a
'saving' ruleset exists, fallback to '$rules' and otherwise return
an empty array. |
|
getRuleset ( string $ruleset, boolean $mergeWithSaving = false ) : array |
Get a ruleset, and merge it with saving if required. |
|
getRulesets ( ) : array |
Get all the rulesets. |
|
isInvalid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean |
Returns whether the model is invalid or not. |
|
isValid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean |
Returns whether the model is valid or not. |
|
isValidOrFail ( string $ruleset = null ) : boolean |
Returns if the model is valid, otherwise throws an exception. |
|
mergeRulesets ( array $keys ) : array |
Helper method to merge rulesets, with later rules overwriting
earlier ones. |
|
removeRules ( mixed $keys, string $ruleset = null ) |
Remove rules from the existing rules or ruleset. |
|
setRuleset ( array $rules, string $ruleset ) |
Set the rules used for a particular ruleset. |
|
setRulesets ( array $rulesets = null ) |
Set all the rulesets. |
|
updateRulesetUniques ( string $ruleset = null ) |
Update the unique rules of the given ruleset to
include the model identifier. |
|