zoukankan      html  css  js  c++  java
  • jQuery Unobtrusive Validation

    web.config中配置

    <appSettings>
      <add key="webpages:Version" value="3.0.0.0" />
      <add key="ClientValidationEnabled" value="true" />
      <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    </appSettings>

    https://github.com/aspnet/jquery-validation-unobtrusive

    Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.         

    The jQuery Unobtrusive Validation library complements jQuery Validation by adding support for specifying validation options as HTML5 data-* elements.

    This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.

    Remember to make your changes to only the src file. Use ".uild.cmd" to automatically generate the js file in dist directory, minify the js file, create a .nupkg and change the version in the package.json if needed.

    To stage for a release, update the "version.props" file and run ".uild.cmd" (see Release Checklist here).

    Brad Wilson has a couple great articles on unobtrusive validation and unobtrusive ajax.
    It is also shown very nicely in this Pluralsight video in the section on " AJAX and JavaScript".

    Basically, it is simply Javascript validation that doesn't pollute your source code with its own validation code. This is done by making use of data- attributes in HTML.

  • 相关阅读:
    php1
    c# out参数
    c#冒泡算法
    c#方法 最大值我最小值
    方法
    OUT参数
    芮年
    PHP博客
    数组习题
    从郑和下西洋 到华人爱燕窝
  • 原文地址:https://www.cnblogs.com/chucklu/p/12605515.html
Copyright © 2011-2022 走看看