add directives for validation