Welcome Guest, Not a member yet? Register   Sign In
Sanitization with form validation
#5

(01-15-2021, 07:32 PM)iRedds Wrote:
(01-13-2021, 02:01 AM)MrWhite Wrote: Why we cant use trim(), htmlspecialchars() like methods in form validation rules?

Validation and sanitization are two different things.

(01-13-2021, 02:01 AM)MrWhite Wrote: Is there any easy way that we can sanitize $_POST data at once? 
As far as I know, there are no such features in the framework. But you can use third party libraries.
Or use Entity class setters
https://codeigniter.com/user_guide/model...ness-logic

Or you can write your sanitizer and then suggest include it in the core of the framework.

There are many paths. Choose the one that suits you best.


(01-15-2021, 04:23 PM)includebeer Wrote: It should work.

The validation class does not return data submitted for validation. And he does not receive them by reference.


Hey! thanks for the reply.

BTW what do u think about this issue? Do u think this a bug? 

If this is a bug, its great if u can send a PR.

https://forum.codeigniter.com/thread-78399.html
Reply


Messages In This Thread
Sanitization with form validation - by MrWhite - 01-13-2021, 02:01 AM
RE: Sanitization with form validation - by iRedds - 01-15-2021, 07:32 PM
RE: Sanitization with form validation - by MrWhite - 01-15-2021, 10:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB