How to make custom user attribute as required and display in user detail page

Hi folks,

I was looking to add a custom user attribute to my registration page. I have followed the Keycloak documentation for that (https://www.keycloak.org/docs/latest/server_development/#_custom_user_attributes) .

I’m able to display the new attribute in my registration page. How can I make it as a required attribute.

How can I achieve this? Do I need to write an SPI?

Thanks

Hello, did you find any solution ? I have the same problem, create a new custom attribute as required and display it on user detail page
Thank you