Questions tagged [parsley.js]

Parsley.js is a Javascript library that provides an easy interface for form validation using HTML5 data attributes. Currently available as a plugin for jQuery.

Parsley.js is a Javascript library to validate forms built on top of jQuery.

Feature Overview:

  • Dynamic form validation
  • Cross-browser
  • Built-in validators for the most common cases
  • Allows you to craft your own validators
  • Allows you to create remote (ajax) validators
  • Provides events so you can customize you validation process as much as possible

Documentation & Links

753 questions
9
votes
1 answer

Parsley JS 2.x - disabling validation for fields that are not visible

I want to have Parsley not validate an input if it is not visible. I have a large multi-step survey that reveals new sections as you complete it. Each section is in its own tag, and within each form I can have multiple sections that reveal as you…
k_mada
  • 151
  • 1
  • 8
9
votes
1 answer

How can I get Parsley.js to oupt 1 error for a group of radio buttons or checkboxes?

It seems like ParsleyJS outputs an error for each input in an input group. With ParsleyJS 2.x, how can I use the available features to check to make sure a minimum of 1 checkbox in a group is checked and only show 1 error under the entire group of…
jthomas
  • 1,162
  • 1
  • 11
  • 19
8
votes
2 answers

ParsleyJS - Localization with data-parsley-`constraint`-message

Currently I'm using data-parsley-`constraint`-message="English sentence goes here" but now that I'm working to add localization these messages will never be translated using the i18n library because they are custom. Is there a way to add something…
bzmw
  • 5,897
  • 3
  • 22
  • 31
8
votes
3 answers

Exclude invisible Inputs with parsley.js 2.x

How do I tell the parsley-Instance to exclude not visible form elements? I found this in the Documentation: data-parsley-excluded="input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden" But I dont now…
user3507003
  • 359
  • 4
  • 17
8
votes
3 answers

Can Parsley.js work without form element?

Przemysław Banaszek
  • 838
  • 2
  • 11
  • 17
8
votes
5 answers

parsley.js how to trigger an error on a field with a custom error message

It would be great if it was possible to do such thing as $('input.specific-field').parsley('error', 'this is a custom error message'); ...but I guess that isn't possible? How could I achive such thing?
riccardolardi
  • 1,713
  • 5
  • 20
  • 35
8
votes
2 answers

I don't want to display error messages from ParsleyJS

i'm using ParsleyJS library to validate my form, but if a field is invalid i only want to apply the error classes but i don't want to display the error messages. If i use the property data-show-errors="false, then neither the class or the error…
Rauldinho
  • 145
  • 2
  • 7
8
votes
4 answers

Parsley.js Password Confirm doesn‘t work

I have problem with the Parsley.js Framework. My Problem is that the password and password confirm have the same input, but I have a error message if click on the submit button. Here my…
Dave-88
  • 217
  • 2
  • 5
  • 17
7
votes
1 answer

Parsleyjs 2 and Bootstrap 3 input text field with addon obscuring on errors

I am currently trying to implement Parsleyjs 2.2 to work nicely with Bootstrap 3.3. But I am experiencing some problems with getting the errors displayed beneath the text-field with an addon (input-group-addon). I have tricked a bit with the…
7
votes
1 answer

Unable to validate the "floating numbers" with parsley validator

I am using Parsley validator validating my JSP form. However I am having an issue when validating numbers. Please have a look at the below code.
PeakGen
  • 21,894
  • 86
  • 261
  • 463
7
votes
2 answers

parsley.js telephone digits input validating with spaces

I have an input for telephone number. I would like to write this format: 0175 6565 6262 (with spaces). But if write with " " spaces so get error and I write without spaces so get not error. Here my HTML Input:
Dave
  • 2,815
  • 5
  • 19
  • 22
6
votes
3 answers

How to prevent form validation errors to be removed from the DOM with Parsleyjs

I am validating a password field with parsleyjs. The password has three requirements and thus three validation messages: Password needs to have at least 8 characters One special character is required One number is required When a validation…
Ingvi Jónasson
  • 730
  • 8
  • 27
6
votes
1 answer

Parsley Custom Remote Validation with AJAX

I had trouble implementing parsley.remote.js because of AMD in our require configuration. I'm trying to implement a custom validator that does an AJAX request and returns true or false based on the response. Problem is, I keep getting a response of…
lorenzoid
  • 1,812
  • 10
  • 33
  • 51
6
votes
3 answers

How do I show what validation errors Parsley.js has found?

I'm using Parsley.js to validate part of a form like in this example. However, the validate() method always returns false, even when that piece of form should validate. No error messages are displaying, and I want to see what it is that's failed…
Phil Gyford
  • 13,432
  • 14
  • 81
  • 143
6
votes
3 answers

select2 with parsley validation

I've been searching through out the net but I can't find a way to validate select2 using parsley, the one discussed here doesn't seem to work Select2 validate and force user to select ast least X items, this is very frustrating as i need the user to…
Norks
  • 390
  • 1
  • 5
  • 18
1
2
3
50 51