ASP.NET MVC Validation Controls

Rating:        Based on 1 rating
Reviewed:  0 reviews
Downloads: 227
Released: Oct 22, 2009
Updated: Nov 24, 2009 by guramrit
Dev status: Stable Help Icon

Recommended Download

Application Classic.Mvc.Web.UI.dll
application, 26K, uploaded Oct 22, 2009 - 227 downloads

Release Notes

Project Description

This library is complete set of Validation Controls for ASP.NET MVC imported from ASP.NET WebForms in MVC Style, which are used in WebForms. It makes client side validation easier both for Developer and Designer with less code. It's developed in C#.

Feedback requested


On Web.Config

    <add tagPrefix="v" namespace="Classic.Mvc.Web.UI" assembly="Classic.Mvc.Web.UI"/>
    <add namespace="Classic.Mvc.Web.UI"/>

On Site.Master

<v:ValidatorScriptManager runat="server"></v:ValidatorScriptManager>

On View (eg. Index.aspx)

        props =>
				props.ShowSummary = true;
				props.ShowMessageBox = true;
				props.ValidationGroup = "test";

<input id="username" />
<%= Html.RequiredFieldValidator("reqVal_ username", "username",
        options =>
                options.Text = "*";
                options.ErrorMessage = "Invalid Username";
                options.SetFocusOnError = true;
                options.ValidationGroup = "test";
in submit handler of form (in javascript block or file) use following statements to check validity of controls and block submission of form
    return false;
"test" is validation group. You can use ValidationGroup to distinguish between forms

Reviews for this release