-
Notifications
You must be signed in to change notification settings - Fork 91
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
Object-level validation, frontend #3336
Conversation
…-validation-frontend
…-validation-frontend
…-validation-frontend
Codecov Report
@@ Coverage Diff @@
## master #3336 +/- ##
==========================================
+ Coverage 90.71% 90.76% +0.05%
==========================================
Files 34 34
Lines 5662 5662
==========================================
+ Hits 5136 5139 +3
+ Misses 526 523 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…-validation-frontend
…-validation-frontend
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.
Doc looks OK but might make sense to use logical_key
in example to demonstrate how to validate specific object instead of just some object in package.
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.
looks sane.
i'm not quite sure if you're still showing the validation errors "not assigned" to any entries (or are they not expected to be present at all times?). e.g. if you have some error related to several fields or smth like that. also, you only get (.find()
) the first error matching entry path, but can there be more than one per path and they are not shown?
Yes, all entries validation errors are below FilesInput. Unfortunately, they are not very helpful, if you don't know exact JSON Schema. At the same time, I don't show error message in entry. There is a room for improvement here, I address it in the next task. Probably, it's not so important to invest a lot of time into entries meta validation on frontend
With |
This is not very good UX, of course. For example, if Schema requires |
…ta/quilt into object-level-validation-frontend
Updated docs: added |
"invalid"
final-form
API (<RF.Field validate={...here...} />
)Ajv
error with entry context data, and then check if there are added or existing files with that error