I have the following properties in my data model:
[Required]
[DataType(DataType.Text)]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required]
[DataType(DataType.Text)]
[Display(Name = "Last Name")]
public string LastName { get; set; }
My textbox currently have a place holder in them so that when they focus on the textbox the place holder will disappear inside the textbox, if they don't type anything in then the text box val ($(textbox).val()
) is eqaul to "First Name" or "Last Name", how can I check for this so that an error will be returned in my validation saying "Please fill out first name/last name" if the FirstName
or LastName
is equal to "First Name" and "Last Name"