mvc3 validate input 'not-equal-to'

后端 未结 6 1516
滥情空心
滥情空心 2020-12-13 21:33

My forms have inputs with default helper text that guides the user on what to enter (rather than using labels). This makes validation tricky because the input value is never

6条回答
  •  攒了一身酷
    2020-12-13 21:39

    Yes thats the right way to go. You should implement your own atribute and implement IClientValidatable.

    You could also have a required boolean value set initially to false as a hidden form field. When the user changes the textbox, set it to true.

提交回复
热议问题