Skip to content

Instantly share code, notes, and snippets.

@cannap
Created February 16, 2018 16:22
Show Gist options
  • Save cannap/01e0fbf8e1b5643c435a7fc9ce74326c to your computer and use it in GitHub Desktop.
Save cannap/01e0fbf8e1b5643c435a7fc9ce74326c to your computer and use it in GitHub Desktop.
let inputErrors = []
if (this.schema.validator) {
inputErrors = inputErrors.concat(
...validator(this.schema.validator)
.map(validator => {
return validator.validate(
this.value,
this.schema,
this.model,
validator.message
)
})
.filter(val => {
return val
})
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment