gerd
11/3/2016 - 2:51 PM

Example of adding validations.

Example of adding validations.

/**
   * Validating the form element
   */
  validateFormElements : function() {
   /**
    * The validator method which would check for presence of special character. Here period (.) is not considered as a special character.
    */
   $.validator.addMethod("nospecial", function(value, element) {
    var pattern = /[+*,!@#$%^&();/|\\?-]/g;
    return !pattern.test(value);
   }, LN.errorMessages.CODES_RANGE_ERR_MSG);

   $.validator.addMethod("rangeCheck", function(value, element) {
    // Need to be implemented.
   }, '');
  },
  /**