Skip to content
Kevin Cheng edited this page Jul 20, 2017 · 6 revisions

Introducing the Scissors Validation Library

Validations is an essential part of interactive software development. We can get away without it, but unexpected things may happen when a user starts entering unexpected data. Having said that, validation is an oft neglected part of the development process. It's rarely an interesting part of writing software, and when developer's fatigue starts to creep in, becomes the least prioritized task. The system works with or without it, so lazy developers see it as an optional component, not an essential one.

To help combat this repetitive task of implementing validations to data entry modules, I've developed this validations library to automate the configurations required to validate each field. This handles both client-side scripts validation as well as server-side validation. As there are varieties of jQuery-based validation libraries available, the library has the flexibility to use one's preferred library, or even custom solutions.

The primary goals of this library are:

  1. to automate some aspects of page validation across an entire project, and
  2. to ensure these validations are uniform, making it easier to make project-wide changes

The library has similarities to .NET's built-in StringValidatorAttribute and other similar attributes, and in fact I thought I had found an out-of-the-box solution to what I wanted, but alas, this attribute is usable only for custom configuration sections. It could not be used for our own custom codes.

Scissors icon by Icons Land

Next: Defining the Rules