Hi.
I am trying to create a custom validator for the latest version of Episerver forms. However, no matter what I do my validator never shows in the UI. I have tried a few different approached with no luck.
I need to create a regex validator and I have tried the below, which when I tried it a couple of months ago on an older version of Episerver Forms, did show in the UI.
Any help here greatly appreciated.
public class PostCodeValidator : RegularExpressionValidatorBase
{
{
publicoverrideIValidationModelModel
{
get
{
if(_model==null)
{
stringstr="^[1-9][0-9]{3}\s?[a-zA-Z]{2}$";
_model=GetRegularExpressionValidationModel(str,str);
}
return_model;
}
}
}
Also, I am aware that I need to add values for this in the language file, but I dont see to have a lang xml at the moment. Does this need to be named anything specific or put in a specific place in the solution?
Thanks
Gary