Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Employee - Employee should have either middle name or last name
- - First name, Middle name, last name should not be same
- - Should have address id and it should present in address table
- ......
- ......
- Address - In address line if there is an opening bracket it should have a matching closing bracket
- - If user give map url and it doesnt contains "http://" should show error message
- .......
- .......
- public class ValidationController : Controller
- {
- public JsonResult IsAddressValid(string Address)
- {
- //if Address is valid
- return Json(true, JsonRequestBehavior.AllowGet);
- //else
- return Json("Address Not valid", JsonRequestBehavior.AllowGet);
- }
- }
- public class SignupModel
- {
- [Required]
- [Remote("IsAddressValid", "Validation")]
- public string Address{ get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement