Validation on inputs

Did validation on all inputs