validator for validations

It can validate the name,type,age