November Happy Hour will be moved to Thursday December 5th.

Regular expression validator in epi forms

Vote:
 

Hi!

if i use the regular expression validator on a text field in epi forms, I get an exception:

[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
   System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) +14723710
   System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) +105
   System.String.Format(String format, Object arg0) +92

This happens only in the production environment, it works in stage and local.

I have made sure the modules folder, bin folder and web.config is the same. I can't see any custom validators. Any clue what could cause this?

#193320
May 29, 2018 8:26
Vote:
 

Moved to Forms forum.

#193389
May 29, 2018 18:40
Vote:
 

Hi,

are you modifying the language file for Forms? Could you check if your site have xml language file contains:

<episerver.forms.implementation.validation.regularexpressionvalidator>
	<displayname>Regular expression</displayname>
	<message>This field should be in "{0}" format.</message>
</episerver.forms.implementation.validation.regularexpressionvalidator>
#193410
May 30, 2018 7:50
Vote:
 

That was it - Thank you Dac Thach Ngyen! It turned out to be a problem with a forms language file that only excisted in production.

#193493
May 30, 2018 14:06
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.