Skip to content

Move field name validation logic out of mongo #1752

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

Merged
merged 3 commits into from
May 13, 2016

Conversation

drew-gross
Copy link
Contributor

No description provided.

@@ -71,9 +71,6 @@ function transformKeyValue(schema, className, restKey, restValue, {
if (authDataMatch) {
throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'can only query on ' + key);
}
if (validate && !key.match(/^[a-zA-Z][a-zA-Z0-9_\.]*$/)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't add the validation anywhere else or was it a duplicate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was duplicate. Replaced with fieldNameIsValid

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@peterdotjs
Copy link
Contributor

some nits but lgtm.

@ghost
Copy link

ghost commented May 13, 2016

@drew-gross updated the pull request.

@drew-gross drew-gross merged commit e4998c2 into parse-community:master May 13, 2016
@drew-gross drew-gross deleted the tidyness branch May 13, 2016 22:28
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

Successfully merging this pull request may close these issues.

3 participants