[library concept] Harmony (JavaScript and Server side validation simplified) |
[eluser]litzinger[/eluser]
I have no idea if this has been attempted and if I'm trying to reinvent the wheel here, but last night I had an idea to try and combine my favorite JS form validation library (jQuery and http://jquery.bassistance.de/validate/demo-test/) with CI. Usually I have to type in my rules twice, and maintain them in two locations for each form. Below is my first attempt at combining the two. The idea is to put all the form values into a config array, and use that array to populate the CI form validation fields and rules, and to print out the rules in the HTML form fields to be used by the jQuery validation. Below is a simple concept, and I'm stuck on setting the CI messages (via set_message()) to display the custom message when JS is disabled. Let me know if this is a waste of time, or if I'm onto something. site_settings.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Harmony.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); |
Messages In This Thread |
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-07-2007, 02:18 PM
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-07-2007, 02:20 PM
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-08-2007, 02:47 AM
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-08-2007, 07:30 AM
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-08-2007, 05:33 PM
[library concept] Harmony (JavaScript and Server side validation simplified) - by El Forum - 08-08-2007, 07:29 PM
|