refactor directive improvement
refactor and wire up to angular form validation