|
NAMEInput::Validator::Constraint::Callback - Callback constraintSYNOPSIS$validator->field('foo')->callback(sub { my $value = shift; return 1 if $value =~ m/^\d+$/; return (0, 'Value is not a number'); }); DESCRIPTIONRun a callback to validate a field. Return a true value when validation succeded, and false value when failed.In order to set your own error instead of a default one return an array where the error message is the second argument. METHODS"is_valid"Validates the constraint.SEE ALSOInput::Validator, Input::Validator::Constraint
Visit the GSP FreeBSD Man Page Interface. |