Files
mtusi2026lab4/internal/domain/text.go
T
2026-10-01 12:44:59 +03:00

15 lines
232 B
Go

package domain
import (
"fmt"
"strings"
)
func validateNotBlank(field, value string) error {
if strings.TrimSpace(value) == "" {
return fmt.Errorf("%s consists of whitespace only: %w", field, ErrValidation)
}
return nil
}