MCPcopy Index your code
hub / github.com/apache/answer / GetValidatorByLang

Function GetValidatorByLang

internal/base/validator/validator.go:182–187  ·  view source on GitHub ↗
(lang i18n.Language)

Source from the content-addressed store, hash-verified

180}
181
182func GetValidatorByLang(lang i18n.Language) *MyValidator {
183 if GlobalValidatorMapping[lang] != nil {
184 return GlobalValidatorMapping[lang]
185 }
186 return GlobalValidatorMapping[i18n.DefaultLanguage]
187}
188
189// Check /
190func (m *MyValidator) Check(value any) (errFields []*FormErrorField, err error) {

Callers 3

BindAndCheckFunction · 0.92
BindAndCheckReturnErrFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected