Check for valid JSON, validate input length for text field