Welcome Guest, Not a member yet? Register   Sign In
Additional rule for Validation
#1

CodeIgniter has a few roles related to restrict the input to alphanumeric characters. But it does not have a standard rule to limit the input for identifiers. You can of course use regular expressions (like [_a-zA-Z][_a-zA-Z0-9]*) but a native rule would be convenient and has a broad usage, I believe.

Regards,
Hardy
Reply
#2

Doesn't the "alpha_dash" validation rule do this already?
See https://codeigniter4.github.io/CodeIgnit...able-rules
Reply
#3

(This post was last modified: 03-06-2019, 01:19 PM by HardyW.)

(03-06-2019, 11:49 AM)ciadmin Wrote: Doesn't the "alpha_dash" validation rule do this already?
See https://codeigniter4.github.io/CodeIgnit...able-rules

No, not according to the documentation and not according to the implementation: an identifier may not begin with a dash or a number!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB