How to check the new password against Password Policy in a custom webservice

We are using Password Manager 5.7. In the managed AD Domain (2012 R2) we are using Windows fine-grained password policies (FGP). In the Password Manager the FGPs are added and visible under "Password Policies".

In a custom webservice we use the function $global.UserResetPassword. If the user type a password which not fulfil the FGP conditions, the AD user attribute "pwdlastset" will be changed and the function doesn't give an error response. In the PM for the user it looks like the password reset was successfully, but in the AD the password doesn't changed and the user couldn't use the new password for logins.

How we can check the fulfilment the FGP conditions of the new password, before the new password will be set in AD?

Using out-of-the-box the function $global.UserResetPassword, the fulfilment will not be checked and the problem described above are appears.