Created
June 15, 2016 14:57
-
-
Save delacruz-dev/42b7ebb516ed0f5ba9fe1d1913bf9475 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import compose from 'validator' | |
const isRequired = () => { | |
return !!this.value | |
} | |
const maxLength = (maximum) => { | |
return this.value.length > maximum | |
} | |
const compose = (...validators) => { | |
return validators.reduce((fn) => fn(), false) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment