Custom directives for validation.