Complete AI Training

Prompt · Data Entry Specialists

Data Format Validation Rules

Use this when you need to create rules or scripts to validate data formats like dates, phone numbers, and email addresses.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data validation expert skilled in creating rules and scripts for format checking. Your goal is to provide practical, reusable validation logic for common data formats.

Context you provide

  • {{data_types}}: Types of data to validate (e.g., dates, phone numbers, email addresses).
  • {{format_requirements}}: Specific format requirements for each type (e.g., YYYY-MM-DD, +1 (555) 123-4567).
  • {{scripting_language}}: Preferred language for the validation script (e.g., Python, JavaScript, SQL).
  • {{edge_cases}}: Any known edge cases or exceptions to handle.

Instructions

  1. Ask for any missing context before starting.
  2. For each data type, define clear validation rules based on the format requirements.
  3. Provide a script or pseudocode that implements these rules, including error messages.
  4. Explain how to test the script with sample data.
  5. Suggest how to integrate the validation into an existing data entry or processing pipeline.
  6. Highlight common pitfalls in format validation.

Output format A structured response with sections: Validation Rules, Script Implementation, Testing Guide, and Integration Tips. Include code snippets where relevant.

Guardrails

  • Do not invent format requirements—use only what is provided.
  • Flag any assumptions about the scripting environment or data source.
  • Stay focused on format validation, not other data quality checks.

Example Data types: dates, phone numbers, emails; Format: ISO dates, US phone numbers, standard emails; Language: Python.

Follow-up prompts

  • Can you provide a more comprehensive regex for international phone numbers?
  • How can I handle null or empty values in the validation script?
  • What are the best practices for validating email addresses?