sc0ttkclark / jquery-conditions

jQuery Conditions is a new project aiming at providing conditional rule handling for form fields including show/hide/message/validation handling.
Other
10 stars 2 forks source link

Remove 'validation' & PHP functionality for now. #1

Closed sarafen closed 11 years ago

sarafen commented 11 years ago

If the feature-set of the conditions plugin is to offer conditional related functionality then validation should be handled elsewhere. There are already several validation plugin projects that might clash with this functionality that users may already have in use in their projects.

Therefore, I would at least at first stay concerned with just the conditional core and then once that is established if there is good reason then build in some kind of callback or plugin to plugin notification system that would allow an existing validation plugin to intercept potential validation use-cases from the conditions plugin, without the conditions plugin taking over that functionality.

I also would keep it sterile from PHP. If your goal is merely to extend Pods then I can see why you would add in the PHP related functionality, but if you are thinking more universally -- to allow users to use it in whatever setup they have, then adding in PHP is for one language use case (what about Python, Ruby, etc.?) At least at first, keeping things simple and strictly associated with just conditions as they are related to jQuery's role might be best.

Just my two-cents. :)

sc0ttkclark commented 11 years ago

PHP is the fall back, so if the user submits the form they for sure won't get certain data saved and it will validate requirements in the same sort of way.

As for validation, we're keeping things as simple as possible there, we don't want a full blown validation script, but the processing within validation is completely parallel to the processing we already needed for conditional show/hide. It's merely a tiny bit extra to do something other than show/hide, like show a message / error message.

sc0ttkclark commented 11 years ago

Also, I'm aiming at pushing this at other plugins that use conditional forms, which could help spread it's reach and grow it. There's been nothing out there for developers to rely on, and all of the conditional code I've seen implemented has been custom. If we can group together, that will benefit everyone involved, including new developers who may want to implement on their own.

The PHP inclusion will be simplified so that it can be implemented in whatever project it's being used in, like Pods, Gravity Forms, or others.