I used to have fields in Turbine 2.3 of Type: <field name="ClientEmail" mapToProperty="ClientEmail" key="ClientEmail" type="String"> <rule name="required" value="false">Required</rule> <rule name="mask" value="^[a-z0-9]+(?:[a-z0-9-.]*[a-z0-9])[EMAIL PROTECTED](?:[a-z0-9-]*[a-z0-9])?\. [a-z]+$">ValidValue</rule> </field> And <field name="DeadLineDateString" mapToProperty="DeadLine" key="DeadLine" type="DateString"> <rule name="required" value="false">Required</rule> <rule name="format1" value="dd.MM.yy">DD_MM_YYYY</rule> <rule name="flexible" value="false">DD_MM_YY_HH_MM</rule> </field>
If the user left the fields blank in T2.2 it would be accepted by Intake's isAllValid() Method, but now the user has to enter valid values for the form to be submitted.
Could this be worked around with an empty mask?
Is this a bug or a feature?
It is a bug. The new StringValidator does not suspend validation when DefaultValidator has detected that the value is empty and that this is an acceptable value. This bug affects many of the other validators also.
I have just tried prepending my regex with "^$|" in order to allow an empty value through, but this doesn't seem to work.
If you to not specify a mask rule the String validation should succeed, but I don't think DateString will.
I'll look into this further as I am just now hitting this problem myself.
Scott
-- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
