intl_phone_number_input
intl_phone_number_input copied to clipboard
validator .. needs refactoring
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....