· Beginner at FF

Dynamic Phone Number Validation with Country Code in FlutterFlow

I'm a complete beginner in both Flutter and FlutterFlow, and I'm currently building phone number OTP authentication for my app. While I'm excited about the project, I've encountered three specific challenges that I'm humbly seeking your expertise with:

  1. Dynamic Phone Number Length Validation: The form widget's built-in automatic validation seems static. How can I integrate a custom function that leverages a map to validate phone number length based on the respective country code?

  2. Library Integration for Phone Number Validation: I'm looking for a flutter library similar to python/javascript libphonenumbers library. Could anyone suggest a similar flutter library and the best approach to utilize a library function for text field automatic validation within FlutterFlow?

  3. Conditional Border Styling: Is it possible to dynamically modify the text field's border width based on validation results? I want a default 1px border and a 3px border upon validation failure.

Examples:

  • Singapore (+65): 8 digits

  • India (+91): 10 digits

  • Afghanistan (+93): 9 digits

Thank you in advance for your patience and guidance! I'm eager to learn and grow my Flutter and FlutterFlow skills.

1
1 reply