regular expression for email and mobile
$email=$_POST['email'];
$emailPattern = '/^\w{2,}@\w{2,}\.\w{2,4}$/';
$mobilePattern ="/^[7-9][0-9]{9}$/";
if(preg_match($emailPattern, $email)){
echo "Email Success!";
} else if(preg_match($mobilePattern, $email)){
echo "Mobile Success!";
} else {
echo "Invalid entry";
}
Also in JavaScript:
- jquery validator no space
- moment for react
- after load page jquery
- set navigation drawer to open by default react native
- oncheck checkbox javascript
- on success replace class div ajax
- are you sure you want to proceed click ok button javascript code
- create json model online
- javascript add option element to select
- javascript send post data with ajax
- check row empty array javascript
- javascript rpg tutorial
- downgrade angular version in project
- extension for local storage in angular 8
- js array to object with keys
- javascript format date yyyy-mm-dd
- vanilla javascript jwt authentication laravel
- javascript date countdown
- clean up android build react native
- javascript submit a form with id
- group by in javascript
- javascript get referrer
- node js find directory change directory
- jquery for element which doesnt exist on page load