Comments (9)
@illiashvedov I recreated this at my end at it works could you shed more light on this matter
from intl_phone_number_input.
If you set the default country this way, then I canβt enter anything into the number line, but if the phone number was given to me, then it always displays as the wrong number, although if you select the text field and then cancel it, the check says that the number is valid.
from intl_phone_number_input.
If I get this right, I believe what you are trying to say is that anytime you set a new state for the initial value with a valid phone number you get a validation error, right?
from intl_phone_number_input.
Yes
from intl_phone_number_input.
I just pushed a fix Thanks
from intl_phone_number_input.
hi, bellow is my code but i keep getting invalid phone number. when i input the correct phone number
InternationalPhoneNumberInput(
onInputChanged: (PhoneNumber number) {
// print(number.phoneNumber);
},
onInputValidated: (bool value) {
print(value);
},
selectorConfig: SelectorConfig(
selectorType: PhoneInputSelectorType.DIALOG,
),
ignoreBlank: false,
autoValidateMode: AutovalidateMode.disabled,
selectorTextStyle: TextStyle(color: Colors.black),
initialValue: number,
textFieldController: controller,
formatInput: true,
keyboardType: TextInputType.numberWithOptions(
signed: true, decimal: true),
inputBorder: InputBorder.none,
// border: InputBorder.none,
onSaved: (PhoneNumber number) {
print('On Saved: $number');
},
),
from intl_phone_number_input.
I get the same error
from intl_phone_number_input.
I get the same error
hi, i was able to solved error by adding a validator, to the widget.
... sample
borderRadius: BorderRadius.circular(5)),
child: InternationalPhoneNumberInput(
validator: _phoneValidator, // add this line. then declare you _phoneValidator function somewhere
onInputChanged: (PhoneNumber number) {
// print(number.phoneNumber);
},
.....
.......
String? _phoneValidator(value) {
if (value!.length < 6) {
return "Please enter correct phone number";
} else {
return null;
}
}
from intl_phone_number_input.
Thank you Yusuf, I tried it still got the red textfield
from intl_phone_number_input.
Related Issues (20)
- Add background color for selector button
- Support new angolan operator's phone numbers, Africell, +24495*******
- get more info phone numbers when onInputChanged
- Country Flag Padding change when changing PhoneInputSelectorType.DROPDOWN to selectorType: PhoneInputSelectorType.BOTTOM_SHEET HOT 2
- Egypt 015 Code
- smartAuth integration or isNotValid editing access
- Styling option for the country selector dialog box. HOT 1
- Font color of my app is white and country names are not seen due to this.
- Invalid country code error HOT 10
- Curser issue while formating numbers HOT 7
- Number field can't be selected by integration test
- Problem: The number input field on IOS add also the country code HOT 24
- [Question] Confusion about the attribute "DialCode"
- make search request non case sensitive
- On iOS after the phone number is valed country dialcode is added to the number so it appears twice HOT 2
- Autofill does not update the flag
- The phone number no loading
- Enable or Disable selection of country from list HOT 1
- Hello no issue it's mistake sorry :) HOT 1
- Phone number on IOS does not work with country code HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intl_phone_number_input.