All Projects → alisabzevari → ngval

alisabzevari / ngval

Licence: MIT license
ASP.NET MVC validation for AngularJS

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
Classic ASP
548 projects

Projects that are alternatives of or similar to ngval

AspnetMVC
Exemplo de aplicação ASP.NET MVC básica
Stars: ✭ 20 (-25.93%)
Mutual labels:  aspnet-mvc
website
网站设计一类源码仓库
Stars: ✭ 42 (+55.56%)
Mutual labels:  aspnet-mvc
Udemy-MyEvernote-Sample-Project
ASP.NET MVC Yazılımcıların Yükselişi eğitimim için hazırladığım örnek proje.
Stars: ✭ 66 (+144.44%)
Mutual labels:  aspnet-mvc
StormReport
🌀 Library - Create your reports using only annotations
Stars: ✭ 17 (-37.04%)
Mutual labels:  aspnet-mvc
emplea do
Open source tech jobs portal. Made with .Net Core
Stars: ✭ 75 (+177.78%)
Mutual labels:  aspnet-mvc
fluentassertions.mvc
Fluent Assertions extensions for ASP.NET MVC
Stars: ✭ 36 (+33.33%)
Mutual labels:  aspnet-mvc
Bootstrap-Docs
Bootstrap 2.x, 3.x Traditional Chinese Docs, Based on ASP.NET MVC 5 Framework, No Continued maintain just open source it.
Stars: ✭ 16 (-40.74%)
Mutual labels:  aspnet-mvc
X.Web.Sitemap
Simple sitemap generator for .NET
Stars: ✭ 66 (+144.44%)
Mutual labels:  aspnet-mvc
BlipAjax
ASP.NET MVC case study solution for PluralSight Guides. Demonstrates using Ajax helpers and JavaScript with Razor partial views.
Stars: ✭ 47 (+74.07%)
Mutual labels:  aspnet-mvc
AspNetCore-Dynamic-Permission
Dynamic Permission Samples in ASP.NET Core and ASP.NET MVC 5.
Stars: ✭ 19 (-29.63%)
Mutual labels:  aspnet-mvc
MvcAccount
Authentication and Account Management plugin for ASP.NET MVC
Stars: ✭ 22 (-18.52%)
Mutual labels:  aspnet-mvc
angular
Repository for my tutorial course: Learning AngularJS on LinkedIn Learning and Lynda.com. http://raybo.org/angular
Stars: ✭ 79 (+192.59%)
Mutual labels:  angularjs1

ngval

ASP.NET MVC validation for AngularJS.

Getting Started

1.Add data anotations to your entities

public class TestEntity
{
    [Required]
    public string RequiredProperty { get; set; }

    [StringLength(10)]
    public string Length10Property { get; set; }

    [Required]
    [StringLength(10)]
    public string MultipleValidationProperty { get; set; }
}

2.Reference ngval.js to your page

<script src="~/Scripts/ngval.js"></script>

3.Add ngval module to your app module dependencies

var App = angular.module('App', ['ngval']);

4.Use NgValFor Html helper method to insert angularjs directives for validation. It will also add native angularjs directives. And you can use ngval object for error messages and more.

<form name="testForm" novalidate ng-submit="submit()">
    <input type="text" name="username" ng-model="user.name" @Html.NgValFor(u => u.RequiredProperty) />
    {{testForm.username.ngval.hasError}}
    <div ng-repeat="err in testForm.username.ngval.errors">
        <span>{{err.message}}</span>
        <br />
    </div>
    <input type="submit" />
</form>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].