Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xs:pattern does not work and want to me to ascpe '-' char #95

Open
pawajee opened this issue Feb 10, 2022 · 0 comments
Open

xs:pattern does not work and want to me to ascpe '-' char #95

pawajee opened this issue Feb 10, 2022 · 0 comments

Comments

@pawajee
Copy link

pawajee commented Feb 10, 2022

I have following regex validation:

<xs:simpleType name="email_address">
	<xs:restriction base="xs:string">
		<xs:maxLength value="255"/>
		<xs:pattern value="[_a-zA-Z0-9-+]+(\.[_a-zA-Z0-9-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})"/>
	</xs:restriction>
</xs:simpleType>

and getting the below error:

[ERROR] InvalidRegex: Pattern value '[_a-zA-Z0-9-+]+(.[_a-zA-Z0-9-+]+)@[a-zA-Z0-9-]+(.[a-zA-Z0-9-]+)(.[a-zA-Z]{2,4})' is not a valid regular expression. The reported error was: ''-' is an invalid character range. Write '-'.'.
line 2559 of file:/D:/temp/XSDToJSON/xmls.xsd

[ERROR] org.hisrc.jsonix.execution.JsonixInvoker - The model is null, there was probably a problem parsing schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant