Moved common validation situations to directive