Welcome Guest, Not a member yet? Register   Sign In
Ajax and ci4 validation
#4

(This post was last modified: 05-16-2022, 11:19 PM by manager.)

(05-16-2022, 05:58 PM)spreaderman Wrote: Just wondering if it is possible to use ci4’s from validation instead using say jquery’s validate()?  If so, is there an example anywhere?  I assume not possible as cannot see an example but thought I would still ask.  Thank you.
Jquery's validate() method is a client-side validation. CodeIgniters form validation is server-side validation. There is a BIG difference. 
You should always use server-side validation for security reasons, even if you use client-side validation. Never trust user input.

Client-side validations in general used to reduce the number of useless calls to the server.
For example, in your site you have a signup to newsletter form with one input field to enter email address. If there is no client-side validation user may send you empty form, or just text or number instead of email, or just send you invalid email address. All this calls is useless and gives extra load to the webserver.
Reply


Messages In This Thread
Ajax and ci4 validation - by spreaderman - 05-16-2022, 05:58 PM
RE: Ajax and ci4 validation - by iRedds - 05-16-2022, 06:28 PM
RE: Ajax and ci4 validation - by spreaderman - 05-16-2022, 10:05 PM
RE: Ajax and ci4 validation - by manager - 05-16-2022, 11:28 PM
RE: Ajax and ci4 validation - by manager - 05-16-2022, 11:09 PM
RE: Ajax and ci4 validation - by iRedds - 05-16-2022, 11:24 PM
RE: Ajax and ci4 validation - by spreaderman - 05-17-2022, 02:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB