Hello, I've searched the forum and don't see this question anywhere. If there is already an answer please feel free to direct me to the discussion. Apologies if this is a duplicate.
When sending a request to the core_users_create_users endpoint custom field data is not validated in accordance with user profile fields settings
I've created a profile field (text) which is set to be unique. When trying to enter a non-unique value through the Moodle User Admin UI this rule is enforced. When sending the create user request to core_user_create_users accounts are created with the same text in the field that should be unique by definition.
In reviewing user/externallib.php:create_users function (lines 250-257, Moodle 3.7) it appears that there is no call to validate custom fields based on the rules for the field as defined.
Thanks for your help.