validation on create, edit script and create category