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

Make StringSchema.matches options optional #1166

Merged
merged 1 commit into from
Dec 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make StringSchema.matches options optional
The second parameter to matches() should be optional.
bespokebob committed Dec 10, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8cf6694dc2c0d4a76dc49b579ab14bcc72f98cb6
2 changes: 1 addition & 1 deletion src/string.ts
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ export default class StringSchema<
});
}

matches(regex: RegExp, options: MatchOptions | MatchOptions['message']) {
matches(regex: RegExp, options?: MatchOptions | MatchOptions['message']) {
let excludeEmptyString = false;
let message;
let name;