<html>
<head>
<style>
.message
{
border:0px solid black;
background-color:orange;
height:20px;
width:180px;
text-align:center;
display:none;
}
.header11
{
border:0px solid black;
background-color:orange;
height:20px;
width:180px;
text-align:center;
display:none;
}
</style>
<script>
function validation()
{
var name=document.getElementById("name").value;
var email=document.getElementById("email").value;
var mono=document.getElementById("mono").value;
var add=document.getElementById("add").value;
var loc=document.getElementById("loc").value;
if(name=="" && email=="" && mono=="" && add=="" && loc=="")
{
document.getElementById("name").focus();
alert("please Fill the information!");
return false;
}
else if(name=="")
{
document.getElementById("name").value="";
document.getElementById("name").focus();
alert("please enter name");
return false;
}
else if(!email.match(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/) || email=="")
{
alert("please enter Email id");
document.getElementById("email").value="";
document.getElementById("email").focus();
return false;
}
else if(!mono.match (/^(\+91-|\+91|0|9)?\d{10}$/) || mono=="")
{
alert("please enter Mobile Number");
document.getElementById("mono").value="";
document.getElementById("mono").focus();
return false;
}
else if(add.trim()=="")
{
alert("please enter Address");
document.getElementById("add").value="";
document.getElementById("add").focus();
return false;
}
else if (!loc.match(/^[a-zA-Z]+$/) || loc=="")
{
alert("please enter Location");
document.getElementById("loc").value="";
document.getElementById("loc").focus();
return false;
}
else
return true;
}
</script>
</head>
<body>
<div class="header">
<div class="header11" id="demo">All Fields manadatory</div>
<form action="connect.jsp" onsubmit="return validation()">
<div>Name<input type="text" id="name"></div></div>
<div>Email<input type="text" id="email" ></div>
<div>Mobile No<input type="text" id="mono"></div>
<div>Address<textarea rows="5" cols="20" id="add"></textarea></div>
<div>Location<input type="text" id="loc"></div>
<input type="submit" value="submit">
</form>
</div>
</body>
</html>
Here we use meta-characters (can have special meanings in patterns--do not match themselves)
meta-characters are: \ | ( ) [ ] { } ^ $ * + ? .
A meta-character is treated as a normal character if it is back-slashed.
period is a special meta-character which matches any character except newline
In some places we use [],that means we can specify a sequence of characters ex..[abcd]. this exactly matches the specified text.we also specify the range or spans of characters by giving dashes.
ex:[a-z] this matches a character with small letter a to z .
A caret at the left end of a class definition means the opposite.
Character class abbreviations
Abbr. Equiv. Pattern Matches
\d [0-9] a digit
\D [^0-9] not a digit
\w [A-Za-z_0-9] a word character
\W [^A-Za-z_0-9] not a word character
\s [ \r\t\n\f] a whitespace character
\S [^ \r\t\n\f] not a whitespace character
Quantifiers
{n} exactly n repetitions
{m, n} at least m but not more than n
repetitions
Other quantifiers (just abbreviations for the most commonly used quantifiers)
* means zero or more repetitions
e.g., \d* means zero or more digits
+ means one or more repetitions
e.g., \d+ means one or more digits
? Means zero or one
e.g., \d? means zero or one digit
Anchors
The pattern can be forced to match only at the
left end with ^; at the end with $
e.g.1 (mobile number):
(/^(\+91-|\+91|0|9)?\d{10}$/)
in this example we are checking for the proper mobile number.
we gave the expression inside the / / symbol.So that expression will be compared to check the valid contact number.
here we have given \ symbol.so that the literal meaning(plus) will be retained.
^ symbol is to check at the starting of the expression.
so here we are checking for +91 at the starting of the expression. The meaning of | symbol is 'or' meaning, if the previous condition doesn't match,it checks with the second pattern.so /^(\+91-|\+91|0|9) is to check +91 'or' +90. and ? symbol is to check 1 or more occurrence of the previous pattern.and finally \d{10}$/ is for checking 10 digits at the end of the expression.
e.g.2 (email):
if(!email.match(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/) || email=="")
here we have given caret symbol inside / / that means it should check at the starting of the expression.
and also we specified the range..
so ^[_a-z0-9-]+ is to find one or more occurrence of small letter a to z and digits from 0 to 9 at the starting of the expression.
(\.[_a-z0-9-]+)* is to literally match the " . " symbol since its literal meaning is obtained by giving \ symbol and one or more occurrence of alphabets and numeric. * symbol is to check zero or more occurrence of the pattern.
(\.[a-z]{2,3})$/) and $ at the end of the expression means it checks the pattern at the end of the expression.
here a character should be there at least 2 times but not more than 3 times.
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
ReplyDeletedigital marketing training in marathahalli
digital marketing training in rajajinagar
Digital Marketing Training in online
full stack developer training in pune
full stack developer training in annanagar
Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!
ReplyDeletepython training in tambaram
python training in annanagar
python training in velachery
Resources like the one you mentioned here will be very useful to me ! I will post a link to this page on my blog. I am sure my visitors will find that very useful
ReplyDeleteBlueprism training in Pune
Blueprism online training
Blue Prism Training in Pune
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
ReplyDeleteBest AWS Training in Chennai | Amazon Web Services Training in Chennai
AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR
AWS Training in Chennai |Best Amazon Web Services Training in Chennai
AWS Training in Velachery | Best AWS Course in Velachery,Chennai
Good to see this blog admin, I learned a lot from your blog.
ReplyDeleteAngularjs Training in Chennai
Angularjs course in Chennai
Angular Training in Chennai
Best Angularjs Training in Chennai
AWS Training in Chennai
DevOps Training in Chennai
Thanks for your efforts in sharing this effective tips to my vision. kindly keep doing more. Waiting for more updates.
ReplyDeleteBest Spoken English Training Institute in T Nagar
Spoken English Class in Kodambakkam
Spoken English in Valasaravakkam
Spoken English Classes in Anna Nagar West
Spoken English Class in Mogappair
Spoken English Classes in Koyambedu
Spoken English Coaching near me
This is really too useful and have more ideas and keep sharing many techniques. Eagerly waiting for your new blog keep doing more.
ReplyDeleteAws Coaching Centre in Bangalore
cloud computing training institutes in bangalore
best cloud computing training in bangalore
cloud computing certification in bangalore
Aws Certification Training in Bangalore
I am happy to find this post Very useful for me, as it contains lot of information
ReplyDeleteArticle submission sites
Technology
Thanks first of all for the useful info.
ReplyDeletethe idea in this article is quite different and innovative please update more.
AWS Training in Vadapalani
AWS Training in Mogappair
Aws Certification in Bangalore
AWS Web Services Training in Bangalore
Thanks for the great blogg!!!
ReplyDeleteselenium training in velachery
Selenium Training in Chennai
Big Data Training in Chennai
web designing training in chennai
Salesforce Training in Tambaram
Salesforce Training in Adyar
I have to thank for sharing this blog, really informative, continue sharing more like this.
ReplyDeleteMachine Learning Course in Chennai
Machine Learning course near me
Data Science Course in Chennai
Data Science Training in Chennai
UiPath Training in Chennai
Angular 6 Training in Chennai
ReplyDeleteYour post is great. It shows your deep understanding of the subject. Waiting for your future posts.
Pega training in chennai
Pega course in chennai
Pega training institutes in chennai
Pega course
Pega training
SAS Training in Chennai
SAS Course in Chennai
IELTS Coaching in Chennai
IELTS Training in Chennai
This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training
Amazing Post. The way of writing is very unique. Your write-up is extra-ordinary. Thanks for Sharing.
ReplyDeleteNode JS Training in Chennai
Node JS Course in Chennai
Node JS Training in Velachery
Node JS Training in Tambaram
Node JS Training in OMR
english to hindi typing
ReplyDeleteI think this is one of the most significant information for me. And i’m glad reading your article. Thanks for sharing!
ReplyDeleteLearn Hadoop Training from the Industry Experts we bridge the gap between the need of the industry. Softgen Infotech provide the Best Hadoop Training in Bangalore with 100% Placement Assistance. Book a Free Demo Today.
Big Data Analytics Training in Bangalore
Tableau Training in Bangalore
Data Science Training in Bangalore
Workday Training in Bangalore
Thanks for sharing this blog. This very important and informative blog
ReplyDeletesap mm training in bangalore
sap mm courses in bangalore
sap mm classes in bangalore
sap mm training institute in bangalore
sap mm course syllabus
best sap mm training
sap mm training centers
Learned a lot of new things from your post! Good creation and HATS OFF to the creativity of your mind.
ReplyDeletesap fico training in bangalore
sap fico courses in bangalore
sap fico classes in bangalore
sap fico training institute in bangalore
sap fico course syllabus
best sap fico training
sap fico training centers
reat learning experience with proficient trainers in Informatica. Flexible timings with hands on experience with real time scenarios.
ReplyDeletecloud computing training institutes in bangalore
cloud computing training in bangalore
best cloud computing training institutes in bangalore
cloud computing training course content
cloud computing training interview questions
cloud computing training & placement in bangalore
cloud computing training center in bangalore
Great Article. the article is very Impressive every content should be neatly represented.
ReplyDeleteData Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery
Thank you - Just shared this post with a colleague who would benefit from reading this, really enjoyed it.Great information provided. I appreciate your work. I like the way you write. Awesome,thanks for your sharing!!
ReplyDeleteData Science Training In Chennai
Data Science Online Training In Chennai
Data Science Training In Bangalore
Data Science Training In Hyderabad
Data Science Training In Coimbatore
Data Science Training
Data Science Online Training
Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
ReplyDeleteweb designing training in chennai
web designing training in velachery
digital marketing training in chennai
digital marketing training in velachery
rpa training in chennai
rpa training in velachery
tally training in chennai
tally training in velachery
ucuz takipçi
ReplyDeleteucuz takipçi
tiktok izlenme satın al
binance güvenilir mi
okex güvenilir mi
paribu güvenilir mi
bitexen güvenilir mi
coinbase güvenilir mi
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post .
ReplyDeletedata analytics courses in hyderabad with placements
smm panel
ReplyDeletesmm panel
iş ilanları
instagram takipçi satın al
Hırdavatçı Burada
Https://www.beyazesyateknikservisi.com.tr/
Servis
tiktok jeton hilesi
ümraniye beko klima servisi
ReplyDeletebeykoz lg klima servisi
üsküdar lg klima servisi
beykoz alarko carrier klima servisi
üsküdar alarko carrier klima servisi
beykoz daikin klima servisi
üsküdar daikin klima servisi
pendik toshiba klima servisi
pendik beko klima servisi