Created
October 17, 2017 23:09
-
-
Save mikermcneil/f0b7013998fd8c6f5c6aa79a7a9a298e 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
// This gist is just to keep track of this somewhere for posterity. | |
// In the future, we might look into adding support for something like the following... | |
// –– | |
// Parse and validate the provided data to ensure it's valid for this | |
// cloud action. (This also provides a basic level of client-side validation.) | |
argins = Cloud.login.parse(argins) | |
.tolerate('E_INVALID_ARGINS', (err)=>{ | |
// Upon noticing any validation error, set error states in the form | |
// accordingly and send back argins as `undefined`. | |
this.formErrors = err.map; | |
}) | |
.now(); | |
// If there were any issues, they've already been communicated to the user, | |
// so simply avast. (We're done here.) | |
if (!argins) { return; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also https://github.com/sailshq/caviar/commit/b88d0331a18aed747201adc6ed1d4da6754b0300