fixed a minor bug on dynamic validations of Resource