HTML::Widget::Constraint(3pm) | User Contributed Perl Documentation | HTML::Widget::Constraint(3pm) |
HTML::Widget::Constraint - Constraint Base Class
my $c = $widget->constraint( $type, @names ); $c->message('Validation error.'); $c->names(@names); $c->not(1);
Constraint Base Class.
Arguments: $message
Return Value: $message
Default error message for failing constraints.
Arguments: $widget
Called once when process() gets called for the first time.
Arguments: $id
Should return JavaScript for client side validation and the like.
Arguments: $message
Contains the validation error message.
Arguments: $message
Returns a validation error message.
Arguments: @names
Return Value: @names
Contains names of params to test.
Arguments: $bool
Return Value: $bool
Negate constraint.
Arguments: $widget
Called every time process() gets called.
Arguments: $widget, $params, \@uploads
Return Value: \@errors
Validates params and returns a arrayref containing HTML::Widget::Error objects representing failed constraints.
Arguments: $id
Returns a hashref containing JavaScripts for client side validation and the like.
Arguments: @names
A list of element names for which an error should be displayed.
If this is not set, the default behaviour is for the error to be displayed for all of the Constraint's named elements.
Arguments: $value
Return Value: $bool
Validates a value and returns 1 or 0.
Sebastian Riedel, "sri@oook.de"
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
2023-08-10 | perl v5.36.0 |