G
Guest
I use the following code to get a valid date input.
validatorExpression = new RegularExpressionValidator();
validatorExpression.ControlToValidate = this.ID;
ValidatorExpression.ErrorMessage = "Valid Input mm/dd/yyyy";
validatorExpression.ValidationExpression = @"^\d{1,2}/\d{1,2}/\d{4}$";
validatorExpression.EnableClientScript = true;
The expression works fine, the problem I have is that when the field is
empty, it is asking the user for a date but one is not required.
How do I allow an empty value?
Thanks!
Ben
validatorExpression = new RegularExpressionValidator();
validatorExpression.ControlToValidate = this.ID;
ValidatorExpression.ErrorMessage = "Valid Input mm/dd/yyyy";
validatorExpression.ValidationExpression = @"^\d{1,2}/\d{1,2}/\d{4}$";
validatorExpression.EnableClientScript = true;
The expression works fine, the problem I have is that when the field is
empty, it is asking the user for a date but one is not required.
How do I allow an empty value?
Thanks!
Ben