keycloakify: Unable to use messagesPerField existsError and get
Hello,
I’m glad that you introduced messagesPerField.exists
and messagesPerField.get
in the new keycloakify v2.4.0 !
Though, I’m unable to use it.
Looking at the code, it seems that if I have no profile.attributes
in my configuration. I don’t know if that’s necessary as I would like to use it on classic fields such as userLabel
, username
, email
, firstName
, lastName
, password
and password-confirm
.
I’m not sure if this is a bug or whether it is intended. I would be happy if you could update the lib for it to iterate on those values at least.
Cheers!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (3 by maintainers)
Commits related to this issue
- Add extra field for u/loki344, in v6 such fields will have to be declared in the package.json #40 — committed to keycloakify/keycloakify by garronej 2 years ago
- #281: Add location and occupation to user attribute (as a patch until https://github.com/keycloakify/keycloakify/issues/40%23issuecomment-1202102662) — committed to keycloakify/keycloakify by garronej a year ago
- #40 — committed to keycloakify/keycloakify by garronej a year ago
- #281: Add location and occupation to user attribute (as a patch until https://github.com/keycloakify/keycloakify/issues/40%23issuecomment-1202102662) — committed to dragonworr/keycloakify by dragonworr a year ago
Hi @loki344,
I added those fields and released a new version (5.9.0) to enable you do move forward with this but note that in the upcoming Keycloakify v6 I will remove them and you would have instead to declare them in the
package.json
like:Maybe it’s best if you add them right away since it wont be mentioned in the v5 to v6 migration guide.
@Romcol @dragonworr Since Keycloakify 7.13, it’s no longer needed to provide
extaFields
.Keycloakify predicts the fieldNames from usage. https://docs.keycloakify.dev/build-options#customuserattributes
After months, this build option has finally been released.
You’re the man! Greetings from Switzerland!
Wow thank you very much for your support!!
Hi @blzzz
You need to use the name directly as such
messagesPerField.existsError("dateOfBirth")
. You can check the source code of the page for better understanding 😃Good luck
Ok noted, this is very much work in progress I just pushed that in the rush yesterday night for those who would need this supported ASAP but a much bigger update is coming this week end