Skip to content

Instantly share code, notes, and snippets.

@chollier
Created September 18, 2014 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chollier/630d3d7235c768b0957f to your computer and use it in GitHub Desktop.
Save chollier/630d3d7235c768b0957f to your computer and use it in GitHub Desktop.
Validators
# 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