added fields for pattern and error_text