-
Notifications
You must be signed in to change notification settings - Fork 74
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
Adding validation for PF4 forms #989
Conversation
3ff6f89
to
f89c48b
Compare
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.
I don't think formValidation
belongs in utilities since it is not reusable. It's too tied to the login components. Also I don't see any validation at all, apart from checking passwords.
I think the idea solution is to provide a generic validation class in utilities folder and import it in the components, and validate values over input elements that can change over time.
On the other hand, if we are not going to provide a responsive validation I don't see the point of cliend-side validation at all. I mean, if we're going to validate only when clicking submit we might as well just validate on server to reduce workload in the UI.
@didierofrivia @hallelujah WDYT?
@josemigallas @damianpm Yes, I don't think that kind of validation is useful nor reusable. There are libs that can aid with simple checks (ie: password don't match, email address invalid, etc..)and we can rely on proper server-side validation to display more specific errors (i.e: user taken) |
@josemigallas @didierofrivia I know this is not reusable. But we have an issue, we are using PF4 react components and I was trying to adjust to that. We can look for a library to do the validation, just keep in mind we should adjust to PF4 components and styling |
@damianpm I don't understand, we should adjust to PF4 components and styling in what sense? What does that have to do with validations? |
In that sense that there are lot of |
Closing in favor of #1005 |
What this PR does / why we need it:
Extract PF4 Form validation to a common file
Which issue(s) this PR fixes
https://issues.jboss.org/browse/THREESCALE-2993