Giter Site home page Giter Site logo

ngval's Issues

Validators not being rendered properly in Razor

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.

Only required is working

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="{&quot;length&quot;:&quot;The Password must be at least 6 characters long.&quot;,&quot;required&quot;:&quot;The Password field is required.&quot;}" 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,

Where is ngval.js?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.