Hi Isomorphic,
is it possible to create a Validator consisting out of two seperate Validators in ds.xml an connect them via OR?
I'm thinking of something like this:
IMO the "OR" is missing there, AND is existing by just naming two validators.
From what I know I could do it with velocity like
but then it will only validate on the server.
Is this correct or am I missing something here?
Best regards,
Blama
is it possible to create a Validator consisting out of two seperate Validators in ds.xml an connect them via OR?
I'm thinking of something like this:
Code:
<field name="x" type="int"> <validators> <validatorgroup connect="or" errorMessage="Not either 1..10, 101..110"> <validator type="integerRange" min="1" max="10"></validator> <validator type="integerRange" min="101" max="110"></validator> </validatorgroup> </validators> </field>
From what I know I could do it with velocity like
Code:
<validators> <validator type="serverCustom" serverCondition="($value >= 1 && $value <= 10) || ($value >= 101 && $value <= 110)" errorMessage="Not either 1..10, 101..110"/> </validators>
Is this correct or am I missing something here?
Best regards,
Blama
Comment