sign-up.js 681 B

1234567891011121314151617181920212223
  1. $(function () {
  2. $('#sign_up').validate({
  3. rules: {
  4. 'terms': {
  5. required: true
  6. },
  7. 'confirm': {
  8. equalTo: '[name="password"]'
  9. }
  10. },
  11. highlight: function (input) {
  12. console.log(input);
  13. $(input).parents('.form-line').addClass('error');
  14. },
  15. unhighlight: function (input) {
  16. $(input).parents('.form-line').removeClass('error');
  17. },
  18. errorPlacement: function (error, element) {
  19. $(element).parents('.input-group').append(error);
  20. $(element).parents('.form-group').append(error);
  21. }
  22. });
  23. });