updated directive to include select elements and added in pattern checking for phone number fields