parsley.js

Validating TinyMCE using Parsley

纵然是瞬间 提交于 2021-02-09 07:30:16
问题 I have a form which is part of a multi-step wizard. At one step, the form has one input and one TinyMCE editor. I'm using ParsleyJS for validating the content of each step before going to the next step. I have my wizard step and validation code defined as below: <form class="form-horizontal" id="step1Form"> <div class="form-group"> <label for="name" class="col-sm-3 control-label">Name:</label> <div id="nameDiv" class="col-sm-9"> <input type="text" maxlength="50" class="form-control" id="name"

Angular 2 with parsley.js validation can't block the submit button

为君一笑 提交于 2020-02-06 04:07:12
问题 I have questions about submit button. Now I can use the parsley validation in the form and it works perfectly. However, when user clicks submit button which binds with angular, and if there is an invalid input in the form, my app can't stop executing the click function. All the validations then become useless. I don't want to use the angular built-in validation since parsely.js can handle so many input situations. The following is my codes: apply-page.ts import {RouteParams,Router,ROUTER

Parsley.js Submit form not working when using addAsyncValidator and remote

你说的曾经没有我的故事 提交于 2020-01-25 10:13:13
问题 I have a registration form split into blocks that was working perfectly using this code based on one of the examples from the website: $('.register-next').on('click', function () { var current = $(this).data('currentBlock'), next = $(this).data('nextBlock'); console.log('current block = ' + current); console.log('next block = ' + next); // only validate going forward. If current group is invalid, do not go further // .parsley().validate() returns validation result AND show errors if (next >

Parsley.js and Laravel Form Validation Errors

▼魔方 西西 提交于 2020-01-25 00:16:10
问题 I am using parsley.js for a client-sided validation and also want to use it for the server-sided validation (Laravel Form Validator) to show the errors using the parsley styling. So that it is uniform. So whenever my server-side validation fails, I would like to show the specific error associated to the correct field. I don´t want to use the remote library. Is there an example how to do this? Link to: Laravel Validator and Parsley Thank you very much! 回答1: You can do something like this: <div

I don't want to display error messages from ParsleyJS

南楼画角 提交于 2020-01-23 05:35:09
问题 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 shows. I used this method of putting display:none in the css: ul.parsley-error-list { display:none !important; } ul.parsley-error-list li { display:none !important; } and it works, but i wanted to know if this is the right approach for doing this or

Parsley.js - Validate optional input for only numbers

风格不统一 提交于 2020-01-22 19:07:28
问题 I have a form that has one optional input and 3 required input fields. For the optional input I have the below markup: <input type="number" placeholder="0" min="0" max="20000" step="100" data-parsley-validation-threshold="1" data-parsley-trigger="keyup"> This does not fire the validation if I have type in letters or any other characters. It does validate for min and max values. If I put required attribute it does seem to work but I don't want that. I also tried defining a pattern as below:

How can I dynamically add and remove form fields to be validated by Parsley.js?

佐手、 提交于 2020-01-20 02:39:19
问题 I have a form ('#registrations') that I am validating with Parsley.js and so far it is working fine. However, I am trying to dynamically remove form fields and add new ones to Parsley validation, depending on what someone selects in a select drop down ('#manufacturer'). Here is my markup: <select name="manufacturer" id="manufacturer" parsley-required="true" data-error-message="Please select a manufacturer."> <option value="apple">Apple</option> <option value="blackberry">Blackberry</option>

How can I dynamically add and remove form fields to be validated by Parsley.js?

爱⌒轻易说出口 提交于 2020-01-20 02:37:07
问题 I have a form ('#registrations') that I am validating with Parsley.js and so far it is working fine. However, I am trying to dynamically remove form fields and add new ones to Parsley validation, depending on what someone selects in a select drop down ('#manufacturer'). Here is my markup: <select name="manufacturer" id="manufacturer" parsley-required="true" data-error-message="Please select a manufacturer."> <option value="apple">Apple</option> <option value="blackberry">Blackberry</option>

Parsley custom validator is not working for javascript installation

帅比萌擦擦* 提交于 2020-01-04 04:24:05
问题 I have the simplest possible form with the simplest custom validator and it is not working, see http://jsfiddle.net/M55M4/ What is wrong? <form id="myform"> <input type="text" data-parsley-myvalidator="foo" data-parsley-required /> <input type="submit" /> </form> $('#myform').parsley({ validators: { myvalidator: function () { return { validate: function (value, requirements) { alert('myvalidator'); return false; }, priority: 32 } } }, messages: { myvalidator: 'my validator failed' } }); 回答1: