Last active
May 2, 2019 20:16
-
-
Save verdi327/ba8bb9d71c56f3d2800288fc0f7b3a36 to your computer and use it in GitHub Desktop.
Functional component for rendering form errors
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 ValidationMessage(props) { | |
if (!props.valid) { | |
return <div className='error-msg'>{props.message}</div> | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment