Checks the name of the policy.
Displays error messages if validation encounters problems during validation of the resource policy.