SYNOPSIS
my $c = $widget->constraint( $type, @names );
$c->message('Validation error.');
$c->names(@names);
$c->not(1);
DESCRIPTION
Constraint Base Class.METHODS
default_message
Arguments: $messageReturn Value: $message
Default error message for failing constraints.
init
Arguments: $widgetCalled once when process() gets called for the first time.
javascript
Arguments: $idShould return JavaScript for client side validation and the like.
msg
message
Arguments: $messageContains the validation error message.
mk_message
Arguments: $messageReturns a validation error message.
names
Arguments: @namesReturn Value: @names
Contains names of params to test.
not
Arguments: $boolReturn Value: $bool
Negate constraint.
prepare
Arguments: $widgetCalled every time process() gets called.
process
Arguments: $widget, $params, \@uploadsReturn Value: \@errors
Validates params and returns a arrayref containing HTML::Widget::Error objects representing failed constraints.
process_js
Arguments: $idReturns a hashref containing JavaScripts for client side validation and the like.
render_errors
Arguments: @namesA 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.
validate
Arguments: $valueReturn Value: $bool
Validates a value and returns 1 or 0.
AUTHOR
Sebastian Riedel, "[email protected]"LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.