created a schema having a field name 'email'. Now i need to verify field is it valid ? if not i want to show a error message. i edit the source as follows :
<xsd:element name="email" minOccurs="0" maxOccurs="50">
<xsd:simpleType>
<xsd:restriction base="xsd:normalizedString">
<xsd:pattern value="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
how can i show a error message? or any other better approach please suggest.
Take a look at some of these links, they should get you on the right track:
Previous SF post - How to display the custom message in SDL Tridion Message bar?
Validating Tridion Content Part 1 - http://nunolinhares.blogspot.co.uk/2012/07/validating-content-on-save-part-1-of.html
Validating Tridion Content Part2 - http://www.curlette.com/?p=913
Cheers