Pan of gold nuggets Input Validation Using Custom CodingPan of gold nuggets

This page demonstrates how input field validation messages can be presented using custom coded validation and messages


Custom Input Validation key points

  • The validation is implemented using custom coded validation and messaging.
  • Invalid input data messages are only displayed and announced after selecting Submit.
  • Invalid data input messages are displayed at the top of the edit form.
  • Invalid data input messages contain the first invalid or required field that is blank.

Please feel free to interact with this data entry form and experiment with its functionality. You may use mouse only, keyboard, or a combination of both. No changes will be saved, but the functionality mimics a real database interaction. Scroll down to see more information about the coding techniques used, behavioral characteristics, and helpful code snippets.

Address Input Form











Problem: Data input validation messages are often not coded properly for assistive technology users.

Solution: Proper coding of the input validation and messaging can result in an usable and accessible experience for all.

Custom Coded Data Validation Messages

Input validation messages can be presented to the user in a variety of methods. In the above example, we will present the user with a text message at the top of the edit form. The text of the message will be custom tailored and will not rely on the default or framework based messaging. Valid and invalid messages are displayed for only one field at a time, by natural reading order.

Data input validation is performed by custom coded validation routines written in C#. For example:

  • if (objAddress.FirstName == null || objAddress.FirstName.Trim().Length == 0) = true, then it's invalid.

Gold NuggetData Input Validation Helpful Links

Click to explore some helpful links that were used in coding the data input validation on this page.


Gold NuggetData Input Validation Behavioral Characteristics

Click to see information on the behaviors and characteristics of the data input validation on this page.


Gold NuggetData Input Validation Coding and Logic

Click to examine the coding and logic details that were used for data input validation on this page.