-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support generic validation messages on inputs. #110
feat: Support generic validation messages on inputs. #110
Conversation
This reverts commit 9c47fe2.
Deploy preview for jobber-atlantis ready! Built with commit 90ea008 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few little thoughts for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two little things then I'm good.
@@ -166,13 +186,23 @@ export const FormField = React.forwardRef( | |||
handleValidation(); | |||
}, [value]); | |||
|
|||
let hasErrors = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just thinking we could make a little function that would return hasErrors
this would let us do something like const hasErrors = areThereMessages(validations)
here which would simplify reading this component and then isolate this logic into a method. Also, it's an excuse to use VSCode's fancy refactor tools!
## Validation message | ||
|
||
You can add your own custom validation messages on a field. However, this | ||
shouldn't replace of your server-side validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't replace of your server-side validation. | |
shouldn't replace server-side validation. |
Changes
success
error
warn
info
messages on inputsAdded
Changed
Deprecated
Removed
Fixed
Security
Testing
In Atlantis we use Github's built in pull request reviews.