Documentation ¶
Index ¶
- func GetFailedValidationFields(err error) (map[FieldName]Message, error)
- func IsFieldValidationError(err error) bool
- func IsLengthLessOrEqual(s string, max int) bool
- func IsUTFAlpahnumeric(s string) bool
- func IsValidUUID(u string) bool
- func RetrieveFieldName(f FieldName) string
- func RetrieveMessage(m Message) string
- type Error
- type FieldName
- type Fields
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFailedValidationFields ¶
GetFailedValidationFields returns the failed validation fields or error if the error is not a fieldValidationFailure
func IsFieldValidationError ¶
IsFieldValidationError returns trye if the error is of type fieldValidationFailure
func IsLengthLessOrEqual ¶
IsLengthLessOrEqual checks if the string has length less than max
func IsUTFAlpahnumeric ¶
IsUTFAlpahnumeric checks if the string contains only unicode letters and numbers. Empty string is valid.
func IsValidUUID ¶
IsValidUUID checks if a given string is a valid v4 UUID
func RetrieveFieldName ¶
RetrieveFieldName returns the underlying field name for f
func RetrieveMessage ¶
RetrieveMessage returns the underlying message for m
Types ¶
type Error ¶
Error is a representation of all input validation errors when initializing a workflow
func (Error) FailedFields ¶
FailedFields returns the fields that failed validation