We have a column of type "E-Mail" and we'd like to attach validation to it so it conforms to the normal regular expression email validations at a specific domain. Is this possible without writing a web part in Visual Studio? Thank you.
|
This codeplex project allows you to add regular expression validation to fields Codeplex - SharePoint Custom Field Type - Regular Expressions Be very careful trying to validate email addresses using RegEx though (either through this tool or javascript) - its seems like a ideal candidate for regex until you get into the details and there are a lot of samples out there that are wrong. For example :-
|
|||
|
|
|
Other methods you can use:
I prefer using script on the blur event because I can give immediate feedback to the user, as they are used to on other modern Web sites. |
|||||||||
|
|
This link gives you two different options. One that involves inserting a hidden web part in the EditForm for the list, and using JQuery to do the actual RegEx validation. Another option is to go with the third-party tool Christian refers to in the article. |
|||||
|