Welcome Guest, Not a member yet? Register   Sign In
What Form Validation Rules For...

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?

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.

xss_clean,trim, max_length etc

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

Theme © iAndrew 2016 - Forum software by © MyBB