1

I have been using Solspace Freeform plugin (Lite edition) with Craft 3. However, I cannot find how to develop validations for the form. Could you tell me how to develop form validations? (E.g. postal code, password)

1

You could use the regex field (not sure if that is available in the lite edition). In that field you could put in regular expressions to evaluate the data entered and force an error if the evaluation doesn't work. For example you could enter this as the regex patter to prevent a field from accepting special characters and numbers: ^[a-zA-Z\s.-_']+$

Freeform also has ways to run validation from either a module or client side with javascript.

Via a module or plugin:

https://docs.solspace.com/craft/freeform/v3/developer/form-events.html#on-validating-the-form

Via JS:

https://docs.solspace.com/craft/freeform/v3/developer/js-plugin.html#adding-callbacks

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.