For a custom validator to work on a user profile page, the validator must have validationGroup set to “Profile“.
Colin “Portal Keeper” Vermander explains why it’s a challenge:
The profile page is still an aspx page and might be harder to hook into. You can change it to a web template with a standard entity form and then you can do what you like normally.
Jim “Actully James” Novak couldn’t help himself to dig deeper:
I just tested with a simple null validator on the job title field. I see that the validator in the Page_Validators array, but its not being called! So must be the custom aspx not working the same as entity / web forms.
And finally, Tanguy helping Tanguy:
Found it! I had to specify the same validationGroup in my validator, which is “Profile” for the profile page. (tj – Once the group is specified, the validator kicks in as usual).