-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add 'StringDoesNotContainAny' validation function #212
Add 'StringDoesNotContainAny' validation function #212
Conversation
@ewbankkit I took the liberty to push to your branch to add a subtle feature. My apologies if you would prefer I not do that in future. @radeksimko I have added a new feature so that validation functions can receive flags in a backwards compatible way in the future. Now a
The nicety of the variadic arg is it can support no flags
This can allow the other validation functions to add support without creating a breaking change.
|
@appilon No worries; a nice enhancement. |
@ewbankkit Sorry for the back and forth. My attempt at adding a NOT feature is more trouble than it's worth. Just going to revert back to your original commit and get it across the finish line. Thank you for your contribution! |
Hi, I'm importing like this:
then using like this:
Am definitely using the up-to-date version of the sdk because I can see the function defined in validation.go. I've also cleared all the Go caches I can think of. Any ideas? Cheers, |
Hello @belperite what provider are you working on? My best guess is you have the go module in your cache and your editor maybe is configured for go modules, but most of our providers actually still use vendoring and have their deps checked into the
|
Hi @appilon thanks for getting back to me, what you suggested worked! I'm working on a custom provider for my employer that I'm sadly unable to share. I'd previously updated to the latest terraform-plugin-sdk (or so I'd thought) and ran the two go mod commands. The only difference as far as I could see this time was that I specified the version at the end of go get. Thanks again :) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Add
StringDoesNotContainAny()
, a validator to ensure that the provided value does not contain any of the specified Unicode code points in chars.