Skip to content

Instantly share code, notes, and snippets.

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 mikermcneil/f0b7013998fd8c6f5c6aa79a7a9a298e to your computer and use it in GitHub Desktop.
Save mikermcneil/f0b7013998fd8c6f5c6aa79a7a9a298e to your computer and use it in GitHub Desktop.
// 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