Validated Prompts Code

Code for validating prompts