Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

roydukkey/Dado.Validators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I have no plans to continue maintain this repo.

Dado.Validators (version 1.0.1)

Dado Validators is an extension of the System.Web.UI.WebControls.BaseValidator class provided by .NET 4. Additional, Mono is supported since v1.0.0 of Dado.Validators.

Features

  • Styling by Class Name: Dado Validators doesn't rely on non-breaking spaces or inline styles, but rather entirely on the class name.
  • Invalid Class Name: Invalid class names are assigned to the validator only when the validation event returns false.
  • Default Error Messages: All validators have default error messages.

Included Validators

VS Dado.Validators Pane

Compare:
Compares the value entered by the user in an input control with the value entered in another input control, or with a constant value.
Custom:
Allows custom code to perform validation on the client and/or server.
Email:
Checks if the value of the associated input control is a valid email address.
File Type:
Checks if the value of the associated input control has an acceptable file extension by resctriction or allowance.
Image:
Checks if the value of the associated input control meets exact, minimum, and maximum height and width constraints.
Length:
Checks if the value of the associated input control meets minimum, and maximum text length constraints.
Phone:
Checks if the value of the associated input control is a valid phone number. Allows speficication of extensions or whether to allow them at all.
Range:
Checks if the value of the associated input control is within some minimum and maximum values, which can be constant values or values of other controls.
Regular Expression:
Checks if the value of the associated input control matches the pattern of a regular expression.
Require Field:
Makes the associated input control a required field. Added support for CheckBox and CheckBoxLists.
Time:
Checks if the value of the associated input control is in a valid time format. ie: HH:mm, h:mm tt, h:mmtt, h:mm, hh:mm tt, hh:mmtt, hh:mm
Type:
Checks if the value of the associated input control is of a specified .NET type. ie: Boolean, Byte, Char, Decimal, Double, Int16, Int32, Int64, SByte, Single
Zip Code:
Checks if the value of the associated input control is a valid zip code.
URI:
Checks if the value of the associated input control is a valid a well formatted URI, either relative, absolute, or both.