This guide will show you how to set a custom number of minimum and maximum characters required in a contact form field (based on RD Mailform).
In order to set a custom number of min and max characters required, you need to follow these steps:
- Connect to your FTP or open the File Manager in hosting control panel and locate the *.html file which contains the contact form code (it is usually added to the Contact Us page).
- You can use the quick search tool (Ctrl+F) to find the contact form code. As a rule, it looks the following way:
- Then you need to add the following code with a space before it (changing 10 and 9999999 to the needed values) for
data-constraints
attribute value:
@Length(min=10,max=999999)
- As a result, you will get the following code:
- Save the changes, re-upload the file accepting the replacement and check your contact form.
Now you know how to set a custom number of min and max characters required in a field based on RD Mailform plugin.