Follow-up from "fix: add dynamic validationSchema for FieldCode component"
The following discussions from !84 should be addressed:
-
@cedric.dupuis started a discussion: (+1 comment) NB: It's the first time we do field level validation.
To me there are two levels of validation:
- the form level, which is supposed to check data model
- the field level, which is supposed to check basic consistency
You clearly implemented a field level consistency validation here, so I'd recommend you just use it on your field instead of exporting it.
Maybe just add a prop to your component to disable this field validation (
noValidatefor example) if it seems useful, but I think we always want to do this check as that's the point of your componentsee https://jaredpalmer.com/formik/docs/guides/validation#field-level-validation
⚡ -
@cedric.dupuis started a discussion: You have a length parameter inside your component but you only really handle layout with 6 elements.
You could a prop
gapIndexwhich is by defaultlength / 2?That's defo a follow-up feature
⚡
