Add the validation of input  data