I set a custom validator on a textbox.
It only validates if there is some text in the textbox, I need it to fire all the time when someone clicks on the submit button.
How can I do this?
I set a custom validator on a textbox.
It only validates if there is some text in the textbox, I need it to fire all the time when someone clicks on the submit button.
How can I do this?
Set your CustomValidator.ValidateEmptyText
to true
.
From MSDN:
[ValidateEmptyText] [g]ets or sets a Boolean value indicating whether empty text should be validated.