Featured On ...

asp.net

totalasp.co.uk

fuzzysoftware.com

devdex.com

123aspx.com

dotnetfreaks.com

411asp.net

and more ...

ASP.NET Validation Package Demo 8 - More validators

The following page continues from Demo 7 demonstrating more of the validators available with the ASP.NET Validation Package and how they can be used with various field or control types. Like Demo 7, this page contains a number of features that were first introduced in the 1.3 release of the validation package. Included in the release are inline message functions, which allow developers to embed properties into the message text. Click on 'show me the code' to take a sneak peek at how this works.

>> Show me the code!

>> Turn off client side validation!




ValidatorEntryRequired

The following example validates that an option is selected from the dropdown list.

ValidatorEntryTextComparer

The following example does the same as the one above except that rather than comparing against a blank value, the validator compares the selection against a literal text value.

ValidatorEntryRegex

This can also be done using a ValidatorEntryRegex validator.

ValidatorEntryCount

The following example uses the ValidatorEntryCount validator to ensure that at least two entries have been selected from the multiple select list.

ValidatorEntryRequired

The following example uses the ValidatorEntryRequired validator to ensure that one of the radio button options is selected.

ValidatorEntryCount

The following example uses the ValidatorEntryCount validator on a CheckBoxList control to ensure that at least two entries have been selected from the control.

ValidatorEntryNValid

The following example uses the ValidatorEntryNValid validator to ensure that at least two of the form fields are filled in correctly.

Phone No. e.g. +1 212 555 1234
Mobile No. e.g. 0732 555 1234
Email Address

© 2002 - 2008 Copyright, Disclaimer and Privacy Statement