Hello!
alisabzevari / ngval Goto Github PK
View Code? Open in Web Editor NEWASP.NET MVC validation for AngularJS
License: MIT License
ASP.NET MVC validation for AngularJS
License: MIT License
Hello!
I looked at the readme file and it mentions about ngval.js, but i cannot find it?
Am i missing something.
Update : Ok I found it in src\NgVal\NgVal.Tests\Scripts\ngval.js
. Any reason to keep it in the test project.
Thanks
The Range attribute defines the minimum and maximum values but ngVal treats it as string length restrictions, creating ng-minlength
and ng-maxlength
attributes.
Hi,
I included your extentions to my project
the ngvalidation is correcly showing up e.g.
<input type="password" class="form-control ng-invalid ng-valid-maxlength ng-dirty ng-valid-parse ng-valid-required ng-invalid-minlength ng-touched" ng-model="registerForm.password" id="password" placeholder="Password" ngval="{"length":"The Password must be at least 6 characters long.","required":"The Password field is required."}" ng-minlength="6" ng-maxlength="100" required="">
but only the required is triggerd
this is the full html of the password
<div class="col-lg-10">
<div class="form-control-wrapper">
<input type="password" class="form-control empty" ng-model="registerForm.confirmPassword" id="confirmPassword" placeholder="Confirm Password" @Html.NgValFor(u => u.ConfirmPassword)><span class="material-input"></span>
</div>
{{registerForm.confirmPassword.hasError}}
<div ng-repeat="err in registerForm.confirmPassword.ngval.errors">
<span>{{err.message}}</span>
<br />
</div>
</div>
any chance you know why?
maybe note:
when I press submit the error box is always empty,
I followed the instructions, and placed the following in my razor page:
@Html.NgValFor(u => u.Note)
However, this was rendered on the page:
ngval='{"required":"The Note field is required."}' required
This form appears on a bootstrap modal, if that makes a different.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.