Control
Because many servers do not support validation controls on settings
So the page with the validation control will have problems with the client button not being submitted
Every time you write JS code to verify the data is too troublesome,
Then there is the problem of the textbox itself, when the TextMode property is set to Multiline, the maxlength fails
For the above question, I wrote this inherited from the textbox using JS in the client data validation of the custom control,
It is almost the same as a textbox, except that a set of validation-related attributes are available on the property panel, and the appropriate configuration can achieve the validation you want.
Download Address:
Http://www.thisky.cn/validateTextBox.rar
=============================
The public properties of the Validatetextbox are:
Name: Check
Type: BOOL
Description: Validation is not validated when set to False, all other [validation-related property] settings are invalid, and the control is a normal textbox.
Name: errwarning
Type: BOOL
Description: Validation error prompts, when set to true, pop-up warning box, set to false text basket background change
Name: Errcolor
Type: string
Description: The background color of the text box when validation fails, only valid if Errwarning is set to false.
Name: Submitbutton
Type: string
Description: The ID number of the button associated with the text box, which is not available if the validation fails
Name: Lengthmin
Type: int
Description: The minimum number of characters entered in the text box, set to 0 without limiting the least input
Name: Lengthmax
Type: int
Description: The maximum number of characters entered in the text box, set to 0 without limiting the maximum input
Name: Regularexpressiontype
Type: enum
Description: The regular expression validation of the text box input is not validated when set to none, int is a non-negative integer, date is 1982-08-26 format date, simple only alphanumeric underline, email is e-mail, custom regular expression.
Name: regexsting
Type: string
Description: A custom regular expression that is valid only when Regularexpressiontype is set to custom.
Name: Regexerr
Type: string
Description: Prompts for custom regular expression validation errors, valid only if Regularexpressiontype is set to custom and Errwarning is set to true.