macos_ui icon indicating copy to clipboard operation
macos_ui copied to clipboard

Please add a validator to the MacosTextField

Open Wassiem-Ibr opened this issue 1 year ago • 4 comments

##Use case In the Flutter material, the textFomField has a validator which checks the value entered by the user and then returns an error if the input is invalid or null https://api.flutter.dev/flutter/material/TextFormField-class.html

So, today I was working on the Macos version of my app and discovered that the validator is not available in the MacosTextField. I had to build a validator using bloc to validate the text and return errors to users about their input

I searched online and discovered that Apple does not have a validator out of the box like Flutter.

Proposal

So, what I am proposing here is to add a validator similar to what material Flutter uses in the TextFormField, which can help a lot to return errors and show the user what he has to do.

Wassiem-Ibr avatar Oct 24 '24 12:10 Wassiem-Ibr

You could also wrap your text field with a FormField widget, have you tried that?

GroovinChip avatar Oct 25 '24 15:10 GroovinChip

yes, I have tried it and it worked fine, thank you

Wassiem-Ibrahim avatar Oct 26 '24 20:10 Wassiem-Ibrahim

Great. This is not a priority for us at the moment, but please feel free to contribute the feature if you like.

GroovinChip avatar Oct 26 '24 20:10 GroovinChip