gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

List type error message targeting particular row after server post validation #395

Open goodwill opened 6 years ago

goodwill commented 6 years ago

tcomb-form@^0.9.17 react@^15.6.1:

How can I assign an error message directly into a particular row (aka item) inside a list? I can't use getValidationErrorMessage because it is server side validation, and customising getOptions doesn't allow me to pinpoint to a particular row, for both getTcombFormOptions and a method for FormOption to be generated. I really think ideally there should have a way to allow a method to be assigned to FormOption for a paricular field, where the same hook method parameters (value, path, context) are still passed, this will make server side validation a lot easier to be populated.