according to the Keycloak docs to add custom user attributes we can edit registration template, for example, add the following snippet to the form:
<div class="form-group">
<div class="${properties.kcLabelWrapperClass!}">
<label for="user.attributes.mobile" class="${properties.kcLabelClass!}">Mobile number</label>
</div>
<div class="${properties.kcInputWrapperClass!}">
<input type="text" class="${properties.kcInputClass!}" id="user.attributes.mobile" name="user.attributes.mobile" value="${(register.formData['user.attributes.mobile']!'')}"/>
</div>
</div>
with this, the custom attribute (mobile) was added to the user. but the user (unregistered user) has full control over these custom attributes, the user can inspect and edit the HTML page to add any other custom attribute (or edit), by changing id and name.
how to prevent users from doing this?

