Added alphanumspace string validator#1484
Conversation
.golangci.yaml
Outdated
| - varnamelen | ||
| - wrapcheck | ||
| - wsl | ||
| - modernize |
There was a problem hiding this comment.
this change is not needed anymore. Please rebase
There was a problem hiding this comment.
rebase is done.
|
Thank you for your contribution to the go-playground/validator project. The changes look good. Could you add a description of your validator to doc.go? |
Descritpion for his validator tag is added to doc.go |
.golangci.yaml
Outdated
| - varnamelen | ||
| - wrapcheck | ||
| - wsl | ||
| - wsl No newline at end of file |
There was a problem hiding this comment.
This change isn’t related to the alphanumspace string validator.
Could you please revert this file?
There was a problem hiding this comment.
This file has been reverted.
Fixes Or Enhances
Make sure that you've checked the boxes below before you submit PR:
@go-playground/validator-maintainers
I’ve been using this package in several projects at our company. Yesterday, while searching for a validation tag that supports alphanumeric characters and spaces for Go structs, I was unable to find an existing one. To address this, I created a regex pattern that allows alphabets, numbers, and spaces.
This pull request adds that regex-based validation tag to the package, extending its functionality for common text fields requiring alphanumeric and space support.
Summary of Changes
Added a new regex validation tag supporting alphabets, numbers, and spaces
Included documentation and tests for the new tag