Try our conversational search powered by Generative AI!

Validating user input in a form

Vote:
 
Hi I'm quite new to C#, asp.net and Episerver and I'm trying to fix a bug in our system. We have a form where people can send a request and they have to enter their email address. When the textfield doesn't have any validation set to it, everything works "fine", but when we set validation to validate as email we get a errormessage when the address has an excess space, such as "mail@domain.com ". What I want to do is to intercept the validation process and trim off any spaces, or other invalid characters that may appear. Is there a way to do this?
#13187
Sep 03, 2007 17:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.