In keycloak registration form I want to make phone number field and Date of birth field mandatory/ required. Without filling phone number and date of birth the form should not be submitted. It should show a validation message like other required fields. How to do this ?
below is the code
#Phone
Mobile No
<input
type="text"
id="user.attributes.phone"
class="${properties.kcInputClass!}"
name="user.attributes.phone"
value="${(register.formData['user.attributes.phone']!'')}"
Date of Birth
/>
</div>
</div>
#Date of Birth
Date of Birth
<div class="${properties.kcInputWrapperClass!}">
<input type="date" class="${properties.kcInputClass!}"
id="user.attributes.dob" name="user.attributes.dob"
value="${(register.formData['user.attributes.dob']!'')}"
/>
</div>
</div>