What Form Validation Rules For... - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: What Form Validation Rules For... (/showthread.php?tid=53498) |
What Form Validation Rules For... - El Forum - 07-26-2012 [eluser]ShoeLace1291[/eluser] What form validation rules or prepping methods do you use for your large bodies of text? For instance, if someone were to post a comment or forum thread with regular grammar, what would you use to validate that? What Form Validation Rules For... - El Forum - 07-26-2012 [eluser]thesleepydog[/eluser] I would think at the bare minimum you would want to make sure to convert any html to non-html form so htmlspecialchars would be one. You probably don't want people posting a books' worth of content so a maxlength is needed. Maybe an XSSfilter. Those would be my primary concerns. But I'm a newb so...don't take it as bible. What Form Validation Rules For... - El Forum - 07-26-2012 [eluser]john_j[/eluser] xss_clean,trim, max_length etc What Form Validation Rules For... - El Forum - 07-26-2012 [eluser]CroNiX[/eluser] Create a rule that allows alphanum, spaces, periods, commas, other syntax symbols like exclamation points, carriage returns, etc. Or, only allow ASCII codes 32 through 127 |