Refactor Validation

Move most of the validation logic to the directive