xtablo-source/backend/templates/auth_forms.go
Arthur Belleville 73935ed11c
feat(02-04): signup templates (full page + HTMX fragment) with render tests
- Create auth_form_errors.templ: FieldError and GeneralError primitives
- Create auth_signup.templ: SignupPage (full) and SignupFormFragment (HTMX swap target)
- Define SignupForm and SignupErrors types in templates/auth_forms.go
- Add three smoke tests: renders form, renders errors, does not echo password
2026-05-14 22:14:28 +02:00

17 lines
584 B
Go

package templates
// SignupForm carries the submitted field values back to the template so
// the email field can be repopulated on validation failure.
// Password is intentionally never echoed back to the client (T-2-01, D-25).
type SignupForm struct {
Email string
Password string // held here only for length validation; never passed to templates
}
// SignupErrors holds per-field and general error messages for the signup form.
// A field with an empty string means "no error for this field".
type SignupErrors struct {
Email string
Password string
General string
}