Last active
August 29, 2015 14:27
-
-
Save dtothefp/794a2862dd0a2733396b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| //input type => Array | |
| var exInput = [ | |
| { | |
| name: 'first_name', | |
| type: 'text', | |
| value: 'burritos', | |
| validation: { | |
| customType: 'email', | |
| conditions: /stuff/ | |
| } | |
| }, | |
| //..... | |
| ]; | |
| //output type => Object | |
| var exOutput = { | |
| [/* name of the input */]: { | |
| type: 'text', | |
| value: 'burritos', | |
| error: `${value} is not an ${validation.customType}` | |
| }, | |
| [/* name of another input */]: //....... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment