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

validator .. needs refactoring #385

Open
chickahoona opened this issue May 5, 2023 · 0 comments
Open

validator .. needs refactoring #385

chickahoona opened this issue May 5, 2023 · 0 comments

Comments

@chickahoona
Copy link

I am sorry but this thing needs refactoring:

https://github.com/natintosh/intl_phone_number_input/blob/master/lib/src/widgets/input_widget.dart#L317-L337

So the default validator (presumably) should return null (if the validation passes) or an error message (if the validation fails).

  • This thing returns an error if "isValid==true". ... Which maniac wrote that? This code was presumambly written on opposite day?
  • Then by checking how isValid is contructed, one sees that "isValid" can only become true if "isNotValid" has been set true before....
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

1 participant