validemail function
dynamic
validemail(
- dynamic text
Implementation
validemail(text) {
var json = {"status": "ok"};
if (ifjs(text)) {
if (RegxExp("@", "i").exec(text)) {
if (RegxExp("@[A-Za-z0-9]\.", "i").exec(text)) {
if (RegxExp("\.[A-Za-z0-9]", "i").exec(text)) {
json["status"] = "ok";
json["description"] = "PLease Fill domain after . in text";
return json;
} else {
json["status"] = "bad";
json["description"] = "PLease Fill domain after . in text";
return json;
}
} else {
json["status"] = "bad";
json["description"] = "PLease Fill . in text";
return json;
}
} else {
json["status"] = "bad";
json["description"] = "PLease Fill @ in text";
return json;
}
} else {
json["status"] = "bad";
json["description"] = "PLease Fill text in parameters";
return json;
}
}