Documentation
¶
Index ¶
- type FormErrorData
- func (f *FormErrorData) GetFieldClasses(field string, baseClasses string) template.HTMLAttr
- func (f *FormErrorData) GetFieldError(field string) string
- func (f *FormErrorData) GetFieldErrors(field string) []string
- func (f *FormErrorData) GetFieldErrorsAsString(field string) string
- func (f *FormErrorData) HasFieldError(field string) bool
- func (f *FormErrorData) HasGlobalError() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormErrorData ¶
FormErrorData represents data for rendering form errors
func NewFormErrorData ¶
func NewFormErrorData(err *pbErrors.StandardError) *FormErrorData
NewFormErrorData creates FormErrorData from a StandardError
func (*FormErrorData) GetFieldClasses ¶
func (f *FormErrorData) GetFieldClasses(field string, baseClasses string) template.HTMLAttr
GetFieldClasses returns CSS classes for a form field based on error state
func (*FormErrorData) GetFieldError ¶
func (f *FormErrorData) GetFieldError(field string) string
GetFieldError returns the first error message for a field
func (*FormErrorData) GetFieldErrors ¶
func (f *FormErrorData) GetFieldErrors(field string) []string
GetFieldErrors returns all error messages for a field
func (*FormErrorData) GetFieldErrorsAsString ¶
func (f *FormErrorData) GetFieldErrorsAsString(field string) string
GetFieldErrorsAsString returns all error messages for a field as a single string
func (*FormErrorData) HasFieldError ¶
func (f *FormErrorData) HasFieldError(field string) bool
HasFieldError checks if a specific field has errors
func (*FormErrorData) HasGlobalError ¶
func (f *FormErrorData) HasGlobalError() bool
HasGlobalError checks if there's a global error
Click to show internal directories.
Click to hide internal directories.