Check password policy on internal user source

I need to leverage/use an internal user source.

Into the extension function "onSaveUser" of User Management component, I need to check if the password respects (or not) the password policy (lenght, complexity... as per gateway rules).

My "final" need is to insert (or not) an audit entry whenever a user is added (admin) or a password is changed (admin and single).

So I need to check if the password is compliant with "policy" and, if not, to reject the save. The same both for a new added user or an updated one.

Is there a way with an internal user source? (I know, with an external user source it is possible)

Thx