You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a simple form with the form builder. I have a text field that needs to be between 0 and 255. My validator looks like this
FormBuilderTextField(
name:"recipeCode",
validator:FormBuilderValidators.compose([
FormBuilderValidators.required(),
FormBuilderValidators.integer(),
FormBuilderValidators.between(0, 255, errorText:"Must be between 0 and 255")
])
),
I get the following compiler error:
The element type 'FormFieldValidator' can't be assigned to the list type 'FormFieldValidator'.
I'm new to Dart and Flutter so I'm not really sure why I'm getting this error. I can use the min() and max() validations in its place for now but I'd rather use between.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm writing a simple form with the form builder. I have a text field that needs to be between
0
and255
. My validator looks like thisI get the following compiler error:
I'm new to Dart and Flutter so I'm not really sure why I'm getting this error. I can use the
min()
andmax()
validations in its place for now but I'd rather usebetween
.Beta Was this translation helpful? Give feedback.
All reactions