code: function length(desiredLength, formatError) {
          'use strict';
          return function (value) {
              value = ((value !== null && value !== undefined) ? value : '');
              if (value.length !== desiredLength) {
                  return formatError(value.length);
              }
              return '';
          };
      }
docs: Returns a validator that checks the length of a string and ensures its equal to a value. If input null return -1
  @param desiredLength The length of the string
  @param formatError a callback which takes the length and formats an appropriate error message for validation failed