Pushed validation logic from categoryDirective to categoryFactory
Preparing for ajax requests