25-12-1/1
This commit is contained in:
@@ -356,9 +356,14 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
|
||||
validator: (phone) {
|
||||
if (phone == null || phone.number.isEmpty) {
|
||||
return 'Please enter your phone number'.tr;
|
||||
} // Check if the number is a Syrian number
|
||||
if (phone.countryISOCode != 'SY') {
|
||||
return 'Only Syrian phone numbers are allowed'.tr;
|
||||
}
|
||||
// Check if the national number part starts with '0'
|
||||
if (phone.number.startsWith('0')) {
|
||||
if (phone.completeNumber.startsWith('96309') ||
|
||||
phone.completeNumber.startsWith('+9630') ||
|
||||
phone.completeNumber.startsWith('09')) {
|
||||
return 'Please enter the number without the leading 0'.tr;
|
||||
}
|
||||
if (phone.completeNumber.length < 10) {
|
||||
|
||||
Reference in New Issue
Block a user