Created
September 18, 2014 16:14
-
-
Save chollier/630d3d7235c768b0957f to your computer and use it in GitHub Desktop.
Validators
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
# Dans app.coffee : | |
# du coup tu peux push des custom la dedans | |
validators = require('react-form-builder').Validators | |
_.each validators, (value, key) -> | |
window.validators[key] = new value() | |
# form definition | |
{ | |
type: 'text-field' | |
dataKey: 'name' | |
displayName: 'Internal Name' | |
validators: { | |
LengthValidator: { | |
min: 5 | |
max: 50 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment