X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FValidate.pm;h=18a350192a13064782302d62875e2289bbf758a2;hb=a9adfe5a3786f860510fcf10792958a25e1a7727;hp=3d47299fb05912932ce3fa86e396bf9b48f6c6b3;hpb=ba92ea5b36cbcd9c03016491dfb06dfc74baf409;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/Validate.pm b/lib/CGI/Ex/Validate.pm index 3d47299..18a3501 100644 --- a/lib/CGI/Ex/Validate.pm +++ b/lib/CGI/Ex/Validate.pm @@ -22,7 +22,7 @@ use vars qw($VERSION @UNSUPPORTED_BROWSERS ); -$VERSION = '2.16'; +$VERSION = '2.20'; $DEFAULT_EXT = 'val'; $QR_EXTRA = qr/^(\w+_error|as_(array|string|hash)_\w+|no_\w+)/; @@ -120,6 +120,7 @@ sub validate { push @$fields, { %{$val_hash->{$field}}, field => $field }; } } + return if ! $fields; ### Finally we have our arrayref of hashrefs that each have their 'field' key ### now lets do the validation @@ -1739,6 +1740,11 @@ field has been checked and there are no errors - the field is "untainted." This is for use in conjunction with perl's -T switch. +=item C + +Clears the form field should a validation error occur. Only supported +on the Javascript side (no affect on the server side). + =back =head1 ERROR OBJECT