Featured On ...

asp.net

totalasp.co.uk

fuzzysoftware.com

devdex.com

123aspx.com

dotnetfreaks.com

411asp.net

and more ...

ASP.NET Validation Package FAQs

We hope that your question will be answered here. In the event that it is not, please send your request to support@madwidgets.com.

General Questions

What is the Mad! Widgets ASP.NET Validation Package?

The Mad! Widgets ASP.NET Validation Package is a form validation package for ASP.NET. It allows you validate form fields on the browser and the server simply by adding a single line of code to either the Code Behind class or the ASPX file. The package was originally based on the built-in ASP.NET validator controls, but has since expanded in its functionality and is now one of the most complete validation solutions for ASP.NET on the market.

How does the Mad! Widgets ASP.NET Validation Package compare with the built-in ASP.NET validator controls?

The Mad! Widgets ASP.NET Validation Package contains dozens of features that are not included in the built-in validator controls. The table below lists these and compares these features against the features of the built-in controls.

Feature Mad! Widgets ASP.NET Validation Package Built-in ASP.NET Validation (Version 1.1)
Support for multiple forms Yes No
Support for multiple validation groups Yes No
Support for WebControls Yes Yes
Support for HtmlControls Yes Yes
Support for non-server controls Yes No
Support for all modern browsers Yes No, only IE
Runtime message properties Yes * No
User-defined message properties Yes * No
Easily customized Validation Summary Yes No
Validation messages as tool-tips on fields Yes No
Logical control & field grouping validators Yes No
Over 2 dozen validators Yes No
Validation while you type and click Yes No
Default validation properties controllable through web.config Yes No
Auto trim on text fields Yes No
Visual validation within form fields Yes No
Visual style change upon validation failure or success Yes No
Pre and post validation events Yes No
Validation summary error messages with 'show me' hyperlinks Yes No
Underying fast architecture Yes No
Auto browser detection Yes Yes
Manual disabling of client-side validation Yes Yes
Validator classes easily extensible for both client-side and server side validation Yes No
Support for adding arbitrary error messages to the Validation Summary Yes No

I’m from Europe and was wondering if the Mad! Widgets ASP.NET Validation Package handles culture sensitive validation, for example, Spanish currency and date formats?

Yes, the Mad! Widgets ASP.NET Validation Package is fully culture sensitive. By default the package will adopt the culture of the server or website, but you can specify a different culture through the web.config file or on the main validator control directly. You can specify any culture name supported by .NET in the RFC 1766 format.

Installation Questions

How can I get Visual Studio to list the MadWidgets.Validation package in the Add Reference dialog?

By default assemblies placed in the GAC will not appear in the Add Reference dialog under the .NET tab. IN order to get the assembly listed there, follow the steps below:

  1. Create a directory: %ProgramFiles%/Common Files/Mad! Widgets/.
  2. Put the MadWidgets.Validation DLL in the new directory.
  3. Add the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\ AssemblyFolders\Mad! Widgets Assemblies.
  4. Set the default value of the key to the path created in (a) above.
  5. Restart Visual Studio.

The Mad! Widgets assembly should now appear in the .NET tab of the Add Reference dialog.

I get the following error after installing the package: Unable to locate license file 'MadWidgets.Validation.Validator.lic.' What does this mean?

This error suggests that the license file that was emailed to you was not placed in a directory that the MadWidgets.Validation.DLL assembly could reach. Please consult the installation guide for a list of locations where the license file can go. If you are sure you have the license file in the correct location, ensure that the ASP.NET account can read the license file by checking its permissions.

I get the following error after installing the package: Could not load type 'MadWidgets.Validation.Validator' What does this mean?

This error suggests that the MadWidgets.Validation.DLL was not placed in a directory that the CLR requires. You must place the DLL either in:

  1. The Global Assembly Cache (GAC)
  2. The site’s /bin directory.
  3. The /bin directory of the sub site (sub domain).

Technical Questions

Can I use the Mad! Widgets ASP.NET Validation Package with non-ASP.NET forms and form fields?

Yes, all validators work with non-server forms. However, there are some limitations with inline messaging when used with non-server forms.

Does the Mad! Widgets ASP.NET Validation Package support multiple forms?

Yes.

Does the Mad! Widgets ASP.NET Validation Package support validation groups?

Yes.

Can I customise the validation summary that comes with the Mad! Widgets ASP.NET Validation Package?

Yes. See Creating Custom Validation Summaries for information how to do this.

Does the Mad! Widgets ASP.NET Validation Package auto-detect the browser version and write out client-side code only when it is supported?

Yes. The client-side code shipped with the package supports IE 5.5+, Netscape 6.0+, Firefox (all versions), Opera 7.0+, Safari (partial support), Konqueror, any other Mozilla 5.0+ based browsers. If a browser version lower than these are used to view your site, the client-side validation code will be automatically disabled on the browser.

What type of validators are shipped with the Mad! Widgets ASP.NET Validation Package?

The following table lists the current validators shipped with the package.

Validator Description
ValidatorEntryAnd Validates two or more controls or fields each of which must be valid to pass validation
ValidatorEntryClientSide The base class for all client-side validators
ValidatorEntryComparer The base class for all comparer validators
ValidatorEntryCount Validates against a specific number of items in a list with options on whether the validator should be considered valid if there are exactly N items, less than N, less than or equal to N, greater than N, greater than or equal to N or not equal to N items.
ValidatorEntryDate Validates that a control or field contains a date in an optional culture specific format.
ValidatorEntryDateComparer Validates the value of two controls or fields or one control or field against a literal date, that the dates compare using defined comparison method and a difference value.
ValidatorEntryDateRange Validates that a control or field contains a date that is within a certain date range.
ValidatorEntryDomain Validates that a control or field contains a domain name or an IP address.
ValidatorEntryEmail Validates that a control or field contains a valid email address.
ValidatorEntryFloat Validates that a control or field contains a numerical value.
ValidatorEntryFloatRange Validates that a control or field contains a floating point number that is within a certain range.
ValidatorEntryInt Validates that a control or field contains an integral value.
ValidatorEntryIntRange Validates that a control or field contains an integer number that is within a certain range.
ValidatorEntryMultipleEntry Base class for all group related validators such as the ValidatorEntryAnd and the ValidatorEntryOr validators.
ValidatorEntryNRequired Validates that a list of controls or fields cannot be left blank. This validator uses a comparison method similar to the ValidatorEntryCount.
ValidatorEntryNumericComparer Validates the value of two controls or fields or one control or field against a literal number, that the numbers compare using defined comparison method and a difference value.
ValidatorEntryNValid Validates that a list of controls or fields must be valid. This validator uses a comparison method similar to the ValidatorEntryCount.
ValidatorEntryOr Similar to the ValidatorEntryAnd validator, this validator validates that at least one control or field is valid
ValidatorEntryPreset Used when adding a fixed error message to the Validation Summary. This is primarily used internally.
ValidatorEntryRegex Validates a control or field against a regular expression.
ValidatorEntryRequired Validates that a control or field is not blank.
ValidatorEntryServerOnly Base class for all server-side only validators.
ValidatorEntrySingleObject Base class for all single field validators.
ValidatorEntryTextComparer Validates the value of two controls or fields or one control or field against a literal string.
ValidatorEntryTextLength Validates that a control or field contains text that whose length is within or a certain range or at least a certain length.
ValidatorEntryUrl Validates that a control or field is a valid URL.
ValidatorEntryWordCount Validates that a control or field contains a specific number of words as defined by the same comparison rules as ValidatorEntryCount.

Does the ASP.NET Validation Package support hierarchical rules, i.e. those with complex ANDs, ORs and sub rules?

Yes. There are some examples of these on Demo 4 and in the samples that are shipped with the package.

Can I control the CSS styles for the fields and error states as well as the validation summary?

Yes. You can control them as you see fit. No styles are hard coded.

Can the CSS styles be controlled from the web.config file so that I don’t have to repeat them on every page that has a form?

Yes. All major properties of the primary validator control can be controlled through the web.config file.

How do I add a validation rule to the ASP.NET Validation Package for my non-ASP.NET form?

Demo 1 under the demonstration section shows how to add validation to non-server controls. There is also information on this in the Getting Started section of the documentation.

How do I add a validation rule to the ASP.NET Validation Package for a form containing HtmlControls or WebControls?

The Getting Started section of the documentation gives a very thorough explanation of how to add validation for HtmlControls or WebControls.

Can I mix validation for non-ASP.NET forms and ASP.NET compliant forms?

Yes, although it would not be terribly normal to do this.

Do I have to place each form field in a validation group?

No. You do not need to use validation groups. Validation groups are used on pages where there are 2 or more logical groups of form fields that would not traditionally be submitted together.

What happens if I have several validation groups (pseudo-forms) on my page and the submit button that is used to post the form back to the server is not linked to a group?

All groups on the within the physical form being submitted will be validated. If you have a page with logically separated groups of form fields, you should wrap them in validation groups to prevent groups being validated that were not supposed to be validated.

Can I customise the images that come with the ASP.NET Validation Package?

Yes, simply replace the image paths listed in the web.config file with the new image paths.

Can I create custom validators with both client-side and server-side validation?

Yes. See the Custom Validation Entries section of the documentation.

Does the Mad! Widgets ASP.NET Validation Package support both VB.NET and C#?

Yes. All languages are supported that are supported by ASP.NET. These currently include C# and VB.NET only.

Can I turn off client-side validation?

Yes.

Can I turn off client-side validation on the browser itself rather than turning it off from the server?

At the moment this feature is not supported due to the possibly that the page could be hacked by an astute hacker. If you require this feature, please send a request for it to be added to support@madwidgets.com.

Does the client-side code in the Mad! Widgets ASP.NET Validation Package block the HTTP form post if any of the validators fail validation?

Yes. All validators must pass validation before the form will be posted back to the server.

I want to add other client-side checks on the form submission even if all validators validate successfully. Can I do this?

Yes, simply add them as you would any other form, e.g.

<form name="theform" id="theform" runat="server" onsubmit="return checkSomeMoreStuff()" > . . .

Do you have example code in both C# and VB.NET?

Yes.

How does the Mad! Widgets ASP.NET Validation Package handle invisible panels, i.e. the control set to invisible? Does it still send validation code to the browser?

Client-side code pertaining to validators that are not ‘visible’ on the server is not sent to the browser.

Can the validators in the Mad! Widgets ASP.NET Validation Package be used in the Code Behind class? Do you have examples of this?

Yes. There are examples how to do this in the samples directory of the zip package.

Payment & Licensing Questions

I have a Server License registered with a specific machine. After changing machines the license no longer works. What can I do?

Go to Update License to update your license details.

Is there any other method for me to purchase a license other than through PayPal?

At this time there is no other method of payment available.

© 2002 - 2008 Copyright, Disclaimer and Privacy Statement