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 Answer 1

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.