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

Problem with "SimpleSchema.RegEx.Email" #193

Closed
thearabbit opened this issue Feb 13, 2017 · 4 comments
Closed

Problem with "SimpleSchema.RegEx.Email" #193

thearabbit opened this issue Feb 13, 2017 · 4 comments
Assignees
Labels
Type: Question Questions and other discussions

Comments

@thearabbit
Copy link

I have problem with

const LoginSchema = new SimpleSchema({
    email: {
        type: SimpleSchema.RegEx.Email,
    },
    password: {
        type: String,
    },

Get error

Unsupported field type: /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
    at invariant (printer.js:170)
    at Auto (printer.js:170)
    at printer.js:170
    at measureLifeCyclePerf (printer.js:170)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner 
@janowsiany janowsiany self-assigned this Feb 13, 2017
@janowsiany
Copy link
Contributor

janowsiany commented Feb 13, 2017

SimpleSchema.RegEx.Email is not valid field type. See simple schema documentation.

Try using regEx property.

@janowsiany janowsiany added the Type: Question Questions and other discussions label Feb 13, 2017
@thearabbit
Copy link
Author

thearabbit commented Feb 14, 2017

Thanks 👍
Could you example for me?

@thearabbit
Copy link
Author

So it mean that I can't use SimpleSchema.oneOf()... too

@janowsiany
Copy link
Contributor

You can use SimpleSchema.oneOf(), the first type will be used to render an input. See this comment.

@Monteth Monteth added this to Closed in Open Source (migrated) Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Questions and other discussions
Projects
Archived in project
Development

No branches or pull requests

2 participants