Added validation (though still not fully working because required validation is failing on the select-* directives using typeahead.