Using {% Settings.CMSPolicyViolationMessage @%}
works instead of {% Settings.GetValue("CMSPolicyViolationMessage", "") |(identity)GlobalAdministrator%}
.
However, the issue is that the $$validation:UserPassword$$
value contains macros and these aren't being resolved.
So if the user leaves the password field blank, the $$validation:UserPassword$$
returns a basic string message set in the validation field for the form property e.g. "Please enter a password.", but if the user enters a password that doesn't meet the password policy $$validation:UserPassword$$
returns the Settings.CMSPolicyViolationMessage message but doesn't resolve the nested macros.