Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 584345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:53:17+00:00 2026-05-13T14:53:17+00:00

Hi I have created a schema to check for email id. which can validate

  • 0

Hi I have created a schema to check for email id. which can validate if the email id is abc@def.com and adbc@def.co.in and abc@def.co.in.pune
But i want to validate only abc@def.com and adbc@def.co.in because i think email can have maximum 2 dots after @ symbol
so the third one will be invalid email id
So how to validate an email id using schema
Below is the schema

<xsd:element name="SSEM" minOccurs="0">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="CNT" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="EM" minOccurs="1" nillable="true" type ="singleEmailID"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>

Thanks
Sunil Kumar Sahoo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:53:17+00:00Added an answer on May 13, 2026 at 2:53 pm

    You will need to define a pattern to match against valid e-mails. Patterns are defined using regular expression syntax. Once you have defined a simple type (based on xs:string) with the appropriate pattern, you can use that for your e-mail type.

    There are several places on the Internet that provide some examples of such types and patterns. An example of an e-mail type is provided here.

    The example given there is as follows (I’ve edited it slightly to make things a little clearer):

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > 
    
      <xsd:element name="A" type="emailAddress"/> 
    
      <xsd:simpleType name="emailAddress"> 
        <xsd:restriction base="xsd:string"> 
          <xsd:pattern value="[^@]+@[^\.]+\..+"/> 
        </xsd:restriction> 
      </xsd:simpleType> 
    </xsd:schema>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have created a schema and the following pattern to check for email
I have created a schema as an agreed upon interface between our company and
I have created an XML schema (foo.xsd) and used xjc to create my binding
I have created a forum board app, based on YAML schema found in 'real
I have created the following vsct file xml. <?xml version=1.0 encoding=utf-8?> <CommandTable xmlns=http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable xmlns:xs=http://www.w3.org/2001/XMLSchema>
I'm trying to create a schema for a <property> element which must have a
I have the following schema: Emp( eid int, ename varchar(50), salary float, email varchar(80))
We have created a custom membership provider, but we have inherited the Role and
First a little introduction. We have an SQL Server Express 2008 database, which schema
I have created a custom pipeline component which transforms a complex excel spreadsheet to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.