Welcome Guest, Not a member yet? Register   Sign In
Server or Client side validation?
#8

[eluser]Phil Sturgeon[/eluser]
There is no choice sadly, you must have Server validation or your data will have as much integrity as a US politician.

If its one or the other, use CodeIgniter (server-side) validation. If you want it to look pretty, use jQuery validation as well as CodeIgniter.

Not much point having a pretty set of error messages if the user can just turn it off and break your site.

I prefer a mix something like:

Code:
[removed]
$(function() {
    $('p.hidden').slideDown();
});
[removed]

<? if ($this->validation->error_string): ?>
    <p class="error hidden">&lt;?=$this->validation->error_string;?&gt;</p>
</p>

Obviously this assumes error is a big red box and hidden is display:none;

Might not be as pretty but simplifies things and means I only have one set of rules to worry about.


Messages In This Thread
Server or Client side validation? - by El Forum - 10-01-2008, 12:42 AM
Server or Client side validation? - by El Forum - 10-01-2008, 12:54 AM
Server or Client side validation? - by El Forum - 10-01-2008, 12:58 AM
Server or Client side validation? - by El Forum - 10-01-2008, 01:19 AM
Server or Client side validation? - by El Forum - 10-01-2008, 01:31 AM
Server or Client side validation? - by El Forum - 10-01-2008, 01:32 AM
Server or Client side validation? - by El Forum - 10-01-2008, 02:10 AM
Server or Client side validation? - by El Forum - 10-01-2008, 03:42 AM
Server or Client side validation? - by El Forum - 10-01-2008, 04:32 AM
Server or Client side validation? - by El Forum - 10-01-2008, 04:38 AM
Server or Client side validation? - by El Forum - 10-01-2008, 04:44 AM
Server or Client side validation? - by El Forum - 10-01-2008, 05:00 AM
Server or Client side validation? - by El Forum - 10-01-2008, 06:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB