BootStrapValidator verification method, bootstrapvalidator

Source: Internet
Author: User

BootStrapValidator verification method, bootstrapvalidator

During input validation, if your front-end framework uses bootstrap, The bootstrapValidator verification method is first introduced. The specific process is as follows:

1. Download and import js files

<link type="text/css" rel="stylesheet" href="${ctx}/components/validate/css/bootstrapValidator.css" /><script type="text/javascript" src="${ctx}/components/validate/js/bootstrapValidator.js"></script><script type="text/javascript" src="${ctx}/components/validate/js/language/zh_CN.js"></script>

II,

$ (Form id :) ({message: 'write the default message here '; feedbackIcons: {valid: 'glyphicon glyphicon-OK', invalid: 'glyphicon glyphicon-delete', validating: 'glyphicon glyphicon-refresh'}, fields: {inputName: {validators: {notEmpty: {message: 'Time cannot be blank '}, regexp: {regexp: /^ [0-9] + $/, message: 'Time consists of digits '}, stringLength: {min: 1, max: 20, message: 'Role name length must be between 1 and 20 '}}}})

There are various verifications on the Internet, and of course there are custom verifications. The time in the above example is composed of numbers.

The above is the BootStrapValidator verification method introduced by xiaobian. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.