Hi Jan, thanks! I will borrow the concept and try to make it works like:

sub action1 {
  ...
  $c->check_required(qw/node token/);
  $c->check_optional(qw/page/);





On Tuesday, February 27, 2018 at 12:08:23 PM UTC+8, Michael Fung wrote:
>
> Hi All,
>
> I am trying out Mojolicious::Validator. It is very elegant. But, if many 
> actions take a optional "page" parameter, then I need to include something 
> like the following for all these actions.
>
> sub action1 {
>   ...
>
>   $validation->optional('page')->num(1,100);
>
>
> Is there a way to avoid this repetition while using Mojolicious::Validator?
>
>
> Thanks,
> Michael
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to