Defensive Input Validator
Create comprehensive input validation instructions with this AI prompt, ensuring robust function boundaries and error prevention.
What this prompt does
- Provides a structured approach to implementing Design by Contract principles in a codebase.
- Guides in creating comprehensive input validation instructions to prevent function misuse.
- Ensures functions are fortified against invalid inputs, preventing runtime errors.
How to use this prompt
- Inside #INFORMATION ABOUT ME section, fill in the [INSERT FUNCTION(S) TO VALIDATE], [INSERT PROGRAMMING LANGUAGE], and [INSERT ERROR HANDLING STYLE] placeholders with your specific functions, programming language, and error handling preference.
- Example: "My function(s) to validate: calculateInterestRate, My programming language: Python, My error handling preference: exceptions."
Premium prompt — included in the Complete AI Bundle. Part of the Coding prompts collection in the God of Prompt library.