Needs work
Project:
Clientside Validation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 23:24 UTC
Updated:
13 Mar 2020 at 16:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jelle_sThese validations require calls to the database. This is a bit too heavy to handle with clientside validation and thus we won't support them. See also #1316678: Field validation not working (comment #3)
Comment #2
jelle_sComment #3
attiks commentedIt would be possible if we can easily plugin to their validation rules, but for the moment all validation is done inside field_validation_field_validation_validate($validator_name, $rule, $entity, $langcode, $items, &$errors), the problem is that we cannot send the full entity to javascript so it can be used as a parameter for a js callback. I think you better open a feature request in field_validation issue queue to ask for a function with minimal (simple) parameters so we can integrate with that.
Comment #4
attiks commentedComment #5
attiks commentedClientside validation supports ajax based validation rules, the only thing that has to be done is to write the code to integrate it, we don't have the time right now, but patches are always welcome.
Comment #6
barrapontoUnique values on multiple fields (on the same node) shouldn't require database roundtrips, should it?
Comment #7
barrapontoComment #8
Coupon Code Swap commentedPerhaps code could be taken from these to implement real-time uniqueness checking:
https://drupal.org/project/formmsgs
https://drupal.org/sandbox/mlncn/1129680
Let me know if this could be sponsored.
Comment #9
barrapontoInitial support for unique values. Will trigger errors on non-unique values for a single field.
Included:
:except_value("any value"). Monkeypatched, will be submitted upstream. Required to avoid validating non-unique "_none" options (happens if user leaves some select widgets unattended)._clientside_validation_set_not_equalselector building to includeselectwidgets.clientside_validation_field_validation_regularLacks:
except_value(): Support for multiple excluded values.:except_valuesupport in_clientside_validation_set_not_equalComment #10
barrapontoComment #11
barrapontoAdded rule group support for multiple fields and proper error messages.
Comment #12
jetwodru commentedno wonder, been trying hard to figure out why the ajax checking on the uniqueness against existing user's email is not working, wishfully implemented soon, Thanks
Comment #13
barraponto@jetwong98 my patch is not dealing with that kind of uniqueness (against other entities'fields) but only on uniqueness among different fields of the same entity.
however, I'd be happy to work on such feature as freelance gig. use my contact form if you're interested.
Comment #14
attiks commented#11 Is this ready for review?
#12 Can you open a separate issue?
Comment #15
barraponto@attiks yes, please review it. Bear in mind that it still lacks:
And, yes, I patched jquery.validate.js. I know I should open a bug upstream, or maybe add an auxiliary jquery file.
Comment #16
FireHawkX commented#11 no longer apply to latest version...