views:

415

answers:

1

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?

+1  A: 

Set your CustomValidator.ValidateEmptyText to true.

From MSDN:

[ValidateEmptyText] [g]ets or sets a Boolean value indicating whether empty text should be validated.

Andrew Hare