Skip to content
Discussion options

You must be logged in to vote

Yes, adding extra columns to users and persisting them with WithUserAdditionalFields is supported and safe.

Your callback is the right place to validate input. Return an error (e.g. limen.NewLimenError(...)) to reject bad data; returned map keys must match your DB column names.

A few notes:

  • The column must already exist in your DB (migration/CLI/manual ALTER TABLE).
  • Check ctx.GetBody() == nil — the callback can run outside HTTP requests.
  • Always validate/sanitize client input before returning it.
  • Your example error says "first_name is required" but checks "username".
  • Default schema includes first_name/last_name unless you use WithUserIncludeNameFields(false).

Future Limen updates shouldn…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ineo7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants