Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Employee - Employee should have either middle name or last name
  2. - First name, Middle name, last name should not be same
  3. - Should have address id and it should present in address table
  4. ......
  5. ......
  6.  
  7. Address - In address line if there is an opening bracket it should have a matching closing bracket
  8. - If user give map url and it doesnt contains "http://" should show error message
  9. .......
  10. .......
  11.  
  12. public class ValidationController : Controller
  13. {
  14.  
  15. public JsonResult IsAddressValid(string Address)
  16. {
  17.  
  18. //if Address is valid
  19. return Json(true, JsonRequestBehavior.AllowGet);
  20.  
  21. //else
  22.  
  23. return Json("Address Not valid", JsonRequestBehavior.AllowGet);
  24.  
  25. }
  26. }
  27.  
  28. public class SignupModel
  29. {
  30. [Required]
  31. [Remote("IsAddressValid", "Validation")]
  32. public string Address{ get; set; }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement