Skip to content

Commit

Permalink
validators
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Dec 17, 2024
1 parent 89a4beb commit 67446d4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/validation/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,26 @@ var Validators = map[*regexp.Regexp]func(match []string, value *generic.Value) e
regexp.MustCompile(`(?i)^ISBN$`): isbnValidator,
regexp.MustCompile(`(?i)^ISBN10$`): isbn10Validator,
regexp.MustCompile(`(?i)^ISBN13$`): isbn13Validator,
regexp.MustCompile(`(?i)^[credit[-]?card$`): creditCardValidator,
regexp.MustCompile(`(?i)^[credit[-_]?card$`): creditCardValidator,
regexp.MustCompile(`(?i)^uuid$`): uuidValidator,
regexp.MustCompile(`(?i)^upperCase$`): upperCaseValidator,
regexp.MustCompile(`(?i)^lowerCase$`): lowerCaseValidator,
regexp.MustCompile(`(?i)^rgb-color$`): _RGBColorValidator,
regexp.MustCompile(`(?i)^rgba-color$`): _RGBAColorValidator,
regexp.MustCompile(`(?i)^hex-color$`): _HEXColorValidator,
regexp.MustCompile(`(?i)^rgb[-_]?color$`): _RGBColorValidator,
regexp.MustCompile(`(?i)^rgba[-_]?color$`): _RGBAColorValidator,
regexp.MustCompile(`(?i)^hex[-_]?color$`): _HEXColorValidator,
regexp.MustCompile(`(?i)^hex$`): _HEXValidator,
regexp.MustCompile(`(?i)^country-alpha-2$`): _CountryAlpha2Validator,
regexp.MustCompile(`(?i)^country-alpha-3`): _CountryAlpha3Validator,
regexp.MustCompile(`(?i)^btc_address`): _BTCAddressValidator,
regexp.MustCompile(`(?i)^eth_address`): _ETHAddressValidator,
regexp.MustCompile(`(?i)^country[-_]?alpha[-_]?2$`): _CountryAlpha2Validator,
regexp.MustCompile(`(?i)^country[-_]?alpha[-_]?3`): _CountryAlpha3Validator,
regexp.MustCompile(`(?i)^btc[-_]?address`): _BTCAddressValidator,
regexp.MustCompile(`(?i)^eth[-_]?address`): _ETHAddressValidator,
regexp.MustCompile(`(?i)^cron`): cronValidator,
regexp.MustCompile(`(?i)^duration`): durationValidator,
regexp.MustCompile(`(?i)^time$`): timestampValidator,
regexp.MustCompile(`(?i)^(unix-timestamp|unix-ts)$`): unixTimestampValidator,
regexp.MustCompile(`(?i)^(unix[-_]?timestamp|unix[-_]?ts)$`): unixTimestampValidator,
regexp.MustCompile(`(?i)^timezone$`): timezoneValidator,
regexp.MustCompile(`(?i)^e164$`): e164Validator,
regexp.MustCompile(`(?i)^safe-html`): safeHTMLValidator,
regexp.MustCompile(`(?i)^no-html$`): noHTMLValidator,
regexp.MustCompile(`(?i)^safe[-_]?html`): safeHTMLValidator,
regexp.MustCompile(`(?i)^no[-_]?html$`): noHTMLValidator,
regexp.MustCompile(`(?i)^phone$`): phoneValidator,
}

Expand Down

0 comments on commit 67446d4

Please sign in to comment.