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

Fix Space Error in isSlug() #1338

Merged
merged 2 commits into from
May 31, 2020
Merged

Fix Space Error in isSlug() #1338

merged 2 commits into from
May 31, 2020

Conversation

asp2809
Copy link
Contributor

@asp2809 asp2809 commented May 31, 2020

Issue #1287

feat(isSlug): Fixed the problem in which isSlug() was also returning true for slugs with spaces for e.g. not a-slug.

I created a regex which will reject the slug while testing if it has spaces in the beginning, in the middle or at the end and has replaced my regex with the current one.

@asp2809
Copy link
Contributor Author

asp2809 commented May 31, 2020

Please have a look and tell me if there is anything that was left out while fixing it.

@profnandaa
Copy link
Member

LGTM, thanks for your contribution and welcome to the project 🎉

@profnandaa profnandaa merged commit ccac8fd into validatorjs:master May 31, 2020
@asp2809
Copy link
Contributor Author

asp2809 commented May 31, 2020

Thanks, looking forward to contributing more in the future.

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.

2 participants