Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Javascript PHP Form Validation Classes/Scripts

Options
  • 02-03-2011 11:25am
    #1
    Registered Users Posts: 912 ✭✭✭


    I've been meaning to tidy up my website form validation in general.

    I have been using simple JavaScript validation on the client side and ad-hoc PHP written on the Server. And combinations of the two.

    I'm long overdue to sort this out properly with both Javascript and PHP validation (maybe some Ajax) to do it.

    There are lot of tutorials etc on the web but I was wondering if anyone has any recommendations of tutorials or of re-usable classes or scripts.

    Feel free to move to development if more relevant.

    Many thanks for any thoughts.


Comments

  • Registered Users Posts: 8,070 ✭✭✭Placebo


    i personally use this all the time: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

    Its a jquery plugin. Handles all sorts of validation, you can even make custom methods. Ajax would be handy if you needed to check if a username[or email?] was already in use. Other than that i just use severside[php] to check if they are already in use and display the message accordingly.
    Ofcourse then you might have to use session variables so people dont lose all their inputs etc

    i dont think its necessary to have the same checks again on server side, Strictly speaking you should have them incase the user does not have javascript enabled/installed.


  • Registered Users Posts: 912 ✭✭✭chakotha


    I'll check that out Placebo thanks.

    I must put together some more thorough server side form data sanitation and sql injection prevention code too.


Advertisement