Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add a validator to the MacosTextField #525

Open
Wassiem-Ibr opened this issue Oct 24, 2024 · 3 comments
Open

Please add a validator to the MacosTextField #525

Wassiem-Ibr opened this issue Oct 24, 2024 · 3 comments

Comments

@Wassiem-Ibr
Copy link

Wassiem-Ibr commented Oct 24, 2024

##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.

@GroovinChip
Copy link
Collaborator

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

@Wassiem-Ibrahim
Copy link

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

@GroovinChip
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants