'MVC Data Annotations unexpected behaviors
I have my data annotation as below:
[RegularExpression("Basement|LL|Concourse|Plaza|1|2|3|4|5|6|7|8|9|10|14|15|16|17", ErrorMessage = "Enter Floor #, or Basement, LL, Concourse, Plaza")]
[Display(Name = "Floor")]
public string Floor { get; set; }
The page element:
@Html.TextBoxFor(m => m.Floor, new { @class = "form-control", id = "employeeFloor" })
Validation fails when I enter 10, 14, 15, 16, or 17. What am I doing wrong here? TIA
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
