add validation to form and migrate to angular 1.3.0