mirror of
https://github.com/chenasraf/sofmani.git
synced 2026-05-18 01:29:02 +00:00
26 lines
494 B
Go
26 lines
494 B
Go
package installer
|
|
|
|
import "fmt"
|
|
|
|
type ValidationError struct {
|
|
FieldName string
|
|
Message string
|
|
InstallerName string
|
|
}
|
|
|
|
func (v ValidationError) Error() string {
|
|
return fmt.Sprintf("Validation Error in %s - Field '%s' is invalid: %s.", v.InstallerName, v.FieldName, v.Message)
|
|
}
|
|
|
|
func validationIsRequired() string {
|
|
return "Must be specified"
|
|
}
|
|
|
|
func validationInvalidFormat() string {
|
|
return "Invalid format"
|
|
}
|
|
|
|
func validationIsNotEmpty() string {
|
|
return "Cannot be empty"
|
|
}
|