Strehler::FormFu::Validator::CategoryUnique - FormFu Validator for Category form.
A FormFu Validate to ensure that a user can't insert a category with the same name of a category already inserted. Parent value of the form must be checked because two category with the same name under different parents can exist.
This validator hasn't the standard HTML::FormFu validators namespace because it makes sense only in a Strehler system.
In category form configuration:
- name: category label: Category constraints: - type: Required message: 'Category needed' - type: Regex regex: '^[^\/]*$' message: 'Invalid character' validators: - type: '+Strehler::FormFu::Validator::CategoryUnique' message: 'Category already exists'
To install Strehler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Strehler
CPAN shell
perl -MCPAN -e shell install Strehler
For more information on module installation, please visit the detailed CPAN module installation guide.