Restricted Values Validator

Allow any value, except the one specified for a given field.

Usage

const schema = new PerfectSchema({
  color: {
    type: String,
    restrictedValues: ['red', 'blue', 'green']
  },
  message: String
});
Extended schema field options