Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > validating form fields View modes: 
User avatar
Member
Member
esolutions - 7/5/2013 3:31:38 PM
   
validating form fields
I have a form where I have a field that isn't required but if the user enters something into it, it should be validated against a regular expression to ensure that the input is in the correct format.

However, when I enter the reqular expression under the Validation > Regular Expression field in the the field setup, it forces the user to enter a value into that field. The "Allow empty value" is checked off.

Any ideas around this?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/5/2013 10:08:58 PM
   
RE:validating form fields
Hi,

In this case, you are using custom validation, so the allow empty value setting is not applied. You need to create a regular expression that allows empty value too + validates your format.

Best regards,
Juraj Ondrus