src/browser/schemaValidator.js
function isRequired(schema) {
    var required = false;
    if (schema[SCHEMAREQUIRED]) {
      try {
        required = schema[SCHEMAREQUIRED];
        if (typeof required != "boolean") {
          throw new ValidationException(
            schema[SCHEMAREQUIRED] + " cast exception."
          );
        }
      } catch (e) {
        throw new ValidationException(
          schema[SCHEMAREQUIRED] + " cast exception."
        );
      }
    }
    return required;
  }
function isRequired(schema) {
    var required = false;
    if (schema[SCHEMAREQUIRED]) {
      try {
        required = schema[SCHEMAREQUIRED];
        if (typeof required != "boolean") {
          throw new ValidationException(
            schema[SCHEMAREQUIRED] + " cast exception."
          );
        }
      } catch (e) {
        throw new ValidationException(
          schema[SCHEMAREQUIRED] + " cast exception."
        );
      }
    }
    return required;
  }
function isRequired ( schema ) { var required = false ; if ( schema [ SCHEMAREQUIRED ] ) { try { required = schema [ SCHEMAREQUIRED ] ; if ( typeof required != "boolean" ) { throw new ValidationException ( schema [ SCHEMAREQUIRED ] + " cast exception." ) ; } } catch ( e ) { throw new ValidationException ( schema [ SCHEMAREQUIRED ] + " cast exception." ) ; } } return required ; }
Check if a key is required by schema
@param  {[type]}  schema [description]
@return {Boolean}        [description]
Check if a key is required by schema