-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Handle form validation for open api form #11963
Conversation
arnav28
commented
Jun 29, 2021
- Added required validator for all the default fields
- Added required validator for all the default fields
ui/app/components/generated-item.js
Outdated
? set(this.validationMessages, name, '') | ||
: set(this.validationMessages, name, this.model.validations.attrs[name].message); | ||
|
||
// Set form button state |
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 like this!
@@ -106,6 +106,7 @@ | |||
|
|||
.message-inline { | |||
display: flex; | |||
align-items: center; |
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.
is this going to be true for all message-inline? worth checking that this doesn't have consequences elsewhere.
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.
This looks really good. A couple of comments, and the following requests:
- Can you add a gif to the PR that shows the validations and how they work?
- Can you add test coverage for this particular validation? You can look at my earlier PR that does this. See file here.
- We are now required to add a changelog for every pr; it can just be something that expands off the previous validations changelogs, specifying the actual validation target here.
Screen.Recording.2021-07-06.at.11.28.45.AM.mov |
- Handle read only inputs during edit mode