You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use strict;
use feature qw(:5.10);
use Data::MuForm;
my $form = Data::MuForm->new(
field_list => [
{
type => "Text",
required => 1,
name => "name"
}
]
);
$form->process(
params => {},
submitted => 1
);
say "errors: " . $form->has_errors();
say "validated: ". $form->validated();
it returns:
errors: 0
validated: 0
So it is both not valid, and has no errors: the situation when no validation has run yet.
After some code inspection I saw that the method setup resets the flag submitted
to 0 when the corresponding field value is not given:
So validation is refused. But according to the documentation the flag submitted is used to force validation..
Wasn't that the way it worked in HTML::FormHandler?
Any idea?
The text was updated successfully, but these errors were encountered:
When I run this code:
it returns:
So it is both not valid, and has no errors: the situation when no validation has run yet.
After some code inspection I saw that the method
setup
resets the flagsubmitted
to 0 when the corresponding field value is not given:
https://github.com/gshank/data-muform/blob/master/lib/Data/MuForm.pm#L833
So validation is refused. But according to the documentation the flag
submitted
is used to force validation..Wasn't that the way it worked in HTML::FormHandler?
Any idea?
The text was updated successfully, but these errors were encountered: