Strict Input Validation and Sanitize Message Box Feature
Overview
This feature implements strict input validation for various fields in the system, including name, phone number, message box, and first/last name. The goal is to prevent HTML injection attacks and ensure that user input conforms to specific character sets.
Validation Rules
* Name Fields: Only letters and apostrophes are allowed.
* Phone Field: Only numbers and hyphens are allowed.
* Message Box:
+ Maximum length: 100 characters
+ Allowed characters: Letters, numbers, spaces, punctuation marks (., , !, ?, ')
+ Forbidden characters: HTML tags, whitespace at start/end
* First Name: Allows international Unicode characters plus space, apostrophe, or dash.
* Last Name: Allows international Unicode characters plus apostrophe, period, space, or dash.
* Country Code: Requires a 1-3 digit code (default to "+1" for US).
* Mobile Number: Flexible for international formats; uses libphonenumber library for strict validation.
Behavior
Changes