Wikiprompt
Talk

Contract-Based Email Validator Prompt

From Wikiprompt, the free prompt encyclopedia

Millie Marconi
Contributed byMillie MarconiXSource

Feb 10, 2026

Contract-Based Email Validator Prompt A structured prompt template for generating production-ready code with explicit goals, constraints, format, and failure criteria, tested against a simple prompt for better results.

Prompt ContentSave

🌐
Generate Python function to validate email addresses. GOAL: Process 50K emails/sec, 99.9% accuracy CONSTRAINTS: No regex libraries, max 30 lines, Python 3.10+ FORMAT: Function + type hints + docstring + 5 test cases FAILURE: If uses external libs OR lacks error handling OR runs >20ms per 1K emails

Sign in to see the full prompt

Continue with:

By logging in, you agree to our Terms of Use and Privacy Policy

Usage

This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:coding| twitter| python| email-validation

Talk