MCPcopy Create free account
hub / github.com/1Password/for-open-source / ParsePlainString

Function ParsePlainString

script/validator.go:83–97  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

81}
82
83func ParsePlainString(value string) (bool, string, string) {
84 if urlRegex.MatchString(value) {
85 return false, value, "cannot contain URLs"
86 }
87
88 if emailRegex.MatchString(value) {
89 return false, value, "cannot contain email addresses"
90 }
91
92 if emojiRegex.MatchString(value) {
93 return false, value, "cannot contain emoji characters"
94 }
95
96 return true, value, ""
97}
98
99func ParseAccountURL(value string) (bool, string, string) {
100 if !accountURLRegex.Match([]byte(value)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected