Skip to content

Release with breaking changes!

Compare
Choose a tag to compare
@filisko filisko released this 11 Mar 21:10
· 361 commits to master since this release
3745af2

This release affects you only if you have custom validators or custom language files. Also you must use from now on semicolon ; for contains validator as a valid options separator.

  • Now custom validators and filters should follow this signature:
// before
protected function validate_required($field, array $input, $param = null);

// now (what used to be in $param now is in $param[0])
protected function validate_required($field, array $input, array $params = []);

In case one of your validators had only one parameter, now it will be in: $params[0]. Benefits are that new validators don't have to do extra checks to check whether the rule has one or more than one parameter.

  • Error messages files don't have to include 'validate_' prefix now.