Reputation: 512
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="Date must be set" ClientValidationFunction="ValidateDate"
ControlToValidate="DropDownList1" Display="Dynamic" class="errorMessage">
</asp:CustomValidator>
This is the custom validator, the client-side function is called ValidateDate
.
function ValidateDate(sender, args) {
args.isValid = false;
}
I wrote this function both in a separate .js file, and in the .aspx file, yet it's not working.
Of course the validation will be bigger, I'm just making a test.
Upvotes: 3
Views: 5323