Spaces:
Running
Running
Update login.html
Browse files- login.html +7 -7
login.html
CHANGED
|
@@ -269,7 +269,7 @@
|
|
| 269 |
|
| 270 |
<div class="input-group">
|
| 271 |
<label>رقم الهاتف</label>
|
| 272 |
-
<input type="tel" id="phone" required placeholder="
|
| 273 |
</div>
|
| 274 |
|
| 275 |
<div class="input-group">
|
|
@@ -332,9 +332,7 @@
|
|
| 332 |
return false;
|
| 333 |
}
|
| 334 |
|
| 335 |
-
// هنا يمكنك إضافة كود الاتصال بالخادم
|
| 336 |
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
| 337 |
-
|
| 338 |
return false;
|
| 339 |
}
|
| 340 |
|
|
@@ -362,15 +360,17 @@
|
|
| 362 |
return false;
|
| 363 |
}
|
| 364 |
|
| 365 |
-
|
| 366 |
-
|
|
|
|
|
|
|
| 367 |
return false;
|
| 368 |
}
|
| 369 |
-
|
| 370 |
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
| 371 |
-
|
| 372 |
return false;
|
| 373 |
}
|
|
|
|
| 374 |
function isValidEmail(email) {
|
| 375 |
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
| 376 |
}
|
|
|
|
| 269 |
|
| 270 |
<div class="input-group">
|
| 271 |
<label>رقم الهاتف</label>
|
| 272 |
+
<input type="tel" id="phone" required placeholder="01xxxxxxxxx" pattern="((\+201|01)[0-2|5]\d{8})">
|
| 273 |
</div>
|
| 274 |
|
| 275 |
<div class="input-group">
|
|
|
|
| 332 |
return false;
|
| 333 |
}
|
| 334 |
|
|
|
|
| 335 |
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
|
|
|
| 336 |
return false;
|
| 337 |
}
|
| 338 |
|
|
|
|
| 360 |
return false;
|
| 361 |
}
|
| 362 |
|
| 363 |
+
// التحقق من صحة رقم الهاتف المصري
|
| 364 |
+
const egyptianPhoneRegex = /^(\+201|01)[0-2|5][0-9]{8}$/;
|
| 365 |
+
if (!egyptianPhoneRegex.test(phone)) {
|
| 366 |
+
showMessage('registerMessage', 'الرجاء إدخال رقم هاتف مصري صحيح', true);
|
| 367 |
return false;
|
| 368 |
}
|
| 369 |
+
|
| 370 |
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
|
|
|
| 371 |
return false;
|
| 372 |
}
|
| 373 |
+
|
| 374 |
function isValidEmail(email) {
|
| 375 |
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
| 376 |
}
|