Reconcile Angular.js and Bootstrap form validation styling

前端 未结 12 1949
刺人心
刺人心 2020-12-22 18:53

I am using Angular with Bootstrap. Here is the code for reference:

12条回答
  •  隐瞒了意图╮
    2020-12-22 19:35

    I know this is a very old question answer thread when I haven't heard the name of AngularJS itself :-)

    But for others who land to this page looking for Angular + Bootstrap form validation in a clean and automated way, I've written a pretty small module for achieving the same without altering the HTML or Javascript in any form.

    Checkout Bootstrap Angular Validation.

    Following are the three simple steps:

    1. Install via Bower bower install bootstrap-angular-validation --save
    2. Add the script file
    3. Add the dependency bootstrap.angular.validation to your application and that's it!!

    This works with Bootstrap 3 and jQuery is not required.

    This is based on the concept of jQuery validation. This module provides some additional validation and common generic messages for validation error.

提交回复
热议问题