Can date time validators be used with FormBuilderDateTimePicker from flutter_form_builder?
#139
Unanswered
michaelowolf
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to use
form_builder_validatorsin combination withflutter_form_builder. I'm not sure which library is more appropriate to ask this in.I'd like to use the date time validators with the
FormBuilderDateTimePicker, which produces a value as aDateTimeinstance (as far as I understand), and expects validators of typeFormFieldValidator<DateTime>. However, all the date time validators expectStringvalues, and so are of typeFormFieldValidator<String>and incompatible.Are these validators expected to be used with the date time picker and, if so, how? I'm sure I'm missing something obvious!
I did notice that there's a value transformer validator, but this seems to expect the return type to match the input type, so doesn't look useful in this case.
Beta Was this translation helpful? Give feedback.
All reactions