• Post Reply Bookmark Topic Watch Topic
  • New Topic

XSD validation for the field of Name

 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All ,

Can anyone suggest how will be the "simpleType" for the field of the name .

Conditions are as :

1)My name should contain atleast one character from a-z or A-Z
2)Other than a-z and A-Z only spaces are allowed.
Examples of valid names

" abc "
"abc"
"abC "
"abc abc abc"
" abc abc abc "


Thanks.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Try something along the following lines:

References:
http://www.w3.org/TR/xmlschema11-2/
Section on regular expressions in the above reference: http://www.w3.org/TR/xmlschema11-2/#regexs
Best wishes!
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!