Added Validation to frontend