Form Element Validation

Summary

Instructions for validating text elements on form in Web CMS.

Body

Issue/Question

How do I ensure that a form element is required or ensure a text based input matches a specified format?

Environment

  • Web CMS

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.

  1. Click Content tab.
  2. Select Forms.
  3. Use Filter to locate your form in the list.
  4. Click Form Title.
  5. Check out the form.
  6. Click Edit tab.
  7. Select the field you want to edit to expand Settings.
  8. Locate the Validation section and use any of the optional settings:
    1. Enter an Error Message to replace the default message with something more specific.
    2. Toggle Required to On and the user must complete the field before submitting the form.
    3. Add a Maximum or Minimum character Length for the field.
    4. 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.

Details

Details

Article ID: 3911
Created
Fri 2/11/22 9:23 AM
Modified
Thu 3/26/26 4:30 PM

Related Articles

Related Articles (6)

Instructions for adding a form to a page in Web CMS.
Instructions for adding WKU styles to a Web CMS form.
Instructions for creating a form on a WKU page through Web CMS.
Information on creating a form that would allow a submission to include files, such as images, PDFs, Word Documents, etc.
Instructions for forms emailing submissions within Web CMS.
Instructions for viewing or downloading form submissions in Web CMS.

Related Services / Offerings

Related Services / Offerings (1)

Do you need assistance with software or a system?