Body
Issue/Question
How do I ensure that a form element is required or ensure a text based input matches a specified format?
Environment
Resolution
Use the Form Element Settings to add requirements to it.
Note: Not all settings apply to every form element, for example checkbox and radio options cannot follow a pattern or have a minimum/maximum length.
- Click Content tab.
- Select Forms.
- Use Filter to locate your form in the list.
- Click Form Title.
- Check out the form.
- Click Edit tab.
- Select the field you want to edit to expand Settings.
- Locate the Validation section and use any of the optional settings:
- Enter an Error Message to replace the default message with something more specific.
- Toggle Required to On and the user must complete the field before submitting the form.
- Add a Maximum or Minimum character Length for the field.
- Use the Pattern input to include a Regular Expression for advanced validation.
Patterns:
- Phone Number:
^(\(\d{3}\)\s?|\d{3}[-.]?)\d{3}[-.]?\d{4}$
- WKU Email:
^([A-Za-z0-9._%+-]+@wku\.edu|[A-Za-z0-9._%+-] +@topper\.wku\.edu)$
- WKU Employee Email:
^[A-Za-z0-9._%+-]+@wku\.edu$
- TopperMail Email:
^[A-Za-z0-9._%+-]+@topper\.wku\.edu$
- WKUID (800 number):
^(800|801)\d{6}$
If you need assistance, please contact the ITS Service Desk or submit a service request by clicking the Request Service button.