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

Case insensitive equality constraint for strings #17

Closed
OldSneerJaw opened this issue May 2, 2018 · 1 comment
Closed

Case insensitive equality constraint for strings #17

OldSneerJaw opened this issue May 2, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@OldSneerJaw
Copy link
Owner

Feature Request

Description

Provide a new constraint for the string validation type that checks for equality while ignoring differences in case.

Examples

myStringProp: {
  type: 'string',
  mustEqualIgnoreCase: function(doc, oldDoc, value, oldValue) {
    return doc.aProp + '-' + doc.bProp;
  }
}
@OldSneerJaw OldSneerJaw added the enhancement New feature or request label May 2, 2018
@OldSneerJaw OldSneerJaw self-assigned this May 2, 2018
OldSneerJaw added a commit that referenced this issue May 2, 2018
… case

The new constraint (`mustEqualIgnoreCase`) operates like `mustEqual` except that it applies only to strings and it ignores differences in case.
@OldSneerJaw
Copy link
Owner Author

Addressed by commit a046a3b.

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

No branches or pull requests

1 participant