public bool UrlValidation(string websiteUrl)
{ var websitePart = websiteUrl.Split('.');
if (websitePart.Length > 2) {
if (websitePart[0] == "www" && websitePart[1].Length > 1 && websitePart[websitePart.Length - 1].Length < 4 && websitePart[websitePart.Length - 1].Length > 1) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
{ var websitePart = websiteUrl.Split('.');
if (websitePart.Length > 2) {
if (websitePart[0] == "www" && websitePart[1].Length > 1 && websitePart[websitePart.Length - 1].Length < 4 && websitePart[websitePart.Length - 1].Length > 1) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
No comments:
Post a Comment