Last active
February 11, 2019 21:28
-
-
Save kettanaito/17b0640cb2a9cdaab279026e51993500 to your computer and use it in GitHub Desktop.
React Advanced Form - Validation messages (async)
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
// src/validation-messages.js | |
export default { | |
... | |
name: { | |
userEmail: { | |
async: ({ value, errorCode }) => { | |
return`E-mail "${email}" is already registered. Error code: ${errorCode}.`; | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Artem, how does ${email} gets resolved? I don’t see it getting passed from params.