Created
September 20, 2016 05:58
-
-
Save justinvdm/bce6275faf5c1fa930fdf732f87c54fa 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
function validate(fields) { | |
return { | |
username: [{ | |
type: 'contains_invalid_chars', | |
payload: { | |
badChars: '@' | |
} | |
}, { | |
type: 'some_other_error'. | |
payload: { | |
// ... | |
} | |
}] | |
}; | |
} | |
<input name="username"> | |
{# username } | |
{# type === 'contan' } | |
Bad because <strong>{{badChars}}</strong> | |
{/} | |
{/username} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment