Hello everyone,
I am working on MVC 5, I want to verify Email ID.
1) I am now validating email addres using jquery.
- function isEmail(email) {
- var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
- return regex.test(email);
- }
2) And checking the email id is existing or not inside database.
- [HttpPost]
- public bool UserEmailIDExist(string emailid)
- {
- if (IsValidEmail(emailid) == true)
- {
- PartnerBIL partnerBIL = new PartnerBIL();
- return partnerBIL.SearchCompanyname(emailid);
- }
- else {
- return true;
- }
- }
-
- public bool IsValidEmail(string email)
- {
-
- }
Also I want to verify the email id is valid online, how can I do that?
Please help me...