Added validation to field and also added attribute called data-type