Sanitization for click inputs

I would like to see some method of easy sanitation after an input. I guess I could define a type and require that type for the input but that seems a little extravagant if I want to make sure that say a field entered is a valid email address during input or to strip out spaces automatically. I know I can do this in the code but it should be possible inside prompt.