triming on data submitting |
You are always going to have to trim data to remove whitespace in text fields (if whitespace is a problem). Even if you do it with JS browser side, you will still have to check and remove it server side too. So you are always going to need a trim function of some sort.
PHP's trim function, Code: trim($string); Jquery's trim function Code: $.trim(string); Javascript trim function Code: string.trim() The 'trim' in the form validation is just applying the native php's trim function. You can set any php function with just one argument to a validation check in CI. https://www.codeigniter.com/user_guide/l...pping-data |
Messages In This Thread |
triming on data submitting - by mstdmstd - 01-07-2017, 02:21 AM
RE: triming on data submitting - by gaska96 - 01-07-2017, 08:22 AM
RE: triming on data submitting - by PaulD - 01-07-2017, 10:42 AM
|