Skip to content

Instantly share code, notes, and snippets.

@SysPete
Created October 28, 2016 16:01
Show Gist options
  • Save SysPete/cdbce45317db8e365039f66746f9c6fb to your computer and use it in GitHub Desktop.
Save SysPete/cdbce45317db8e365039f66746f9c6fb to your computer and use it in GitHub Desktop.
validator( $params, $rules, @additional_args? )
Where:
$params is a hash reference of parameters to be validated.
$rules is one of:
* the name of a rule sub if you are using "rules_class"
* the name of a rule file if you are using "rules_dir"
* a hash reference of rules
* a code reference that will return a hashref of rules
Any optional @additional_args are passed as arguments to code
references/subs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment