Validate and sql injection protection