Azure AD B2C Custom UI error labels shown on first load

别来无恙 提交于 2021-02-04 21:31:07

问题


I have an Azure AD B2C tenant.

I have created a (default) SignUpAndSignInPolicy and added a custom UI template for the sign-in page, the sign-up page and the reset-password page.

All is working well except, on the sign-up page as well as on the reset-password page, the form input fields are always marked "invalid" on the initial load. This causes the error hint to be visible, although there was no user input yet into the form field.

I want to have the same experience as on the sample page of microsoft: https://woodgrovegroceriesb2c.azurewebsites.net/

What ever I try, the error labels are shown on my design upon first page load:

How can I solve this? What am I missing?


回答1:


The Woodgrove Groceries custom page UIs show and hide the field errors as follows:

.attrEntry .error.itemLevel,
.attrEntry .helpText,
.attrEntry .tiny {
  display: none!important;
}

.attrEntry .error.itemLevel.show {
  display: block!important;
}


来源:https://stackoverflow.com/questions/52296225/azure-ad-b2c-custom-ui-error-labels-shown-on-first-load

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!