I need to add some custom validations for my form fields, beyond what can be done by regexes. I have created a custom validator using this approach, assigned it to the built-in Single-Line Text field type, but the form did not display any validation messages (the handler is setting args.IsValid = false at all times for the testing purpose).

Thinking that something might be wrong with the custom implementation, I've tried to add the built-in "Email" validator to the Single-Line Text field, but nothing happened as well.

Just in case, I've republished the whole WFFM item and tested again to the same results.

Did anyone attempt to do the same? Anything I might have missed?

  • I have no issues with Sitecore 8.2 and WFFM validation. Have you tried same steps on vanilla Sitecore 8.2? – Marek Musielak Nov 26 '17 at 18:43
  • @MarekMusielak not yet, will have a try. Just to confirm, by "WFFM validation", you meant adding validators to field types, right? – unclenorton Nov 27 '17 at 8:48
  • Yes, like the built-in "Email" validator. If this doesn't work for you, don't try to add custom validator. First make sure that Sitecore OOTB validation works. – Marek Musielak Nov 27 '17 at 9:00
  • if you removed your custom logic and files does the validation works? , is there any JS file failing to load? – Naim Alkouki Nov 27 '17 at 21:12
  • @MarekMusielak tried with a new sitecore instance on the same machine—same result. – unclenorton Nov 28 '17 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.