Validation added to calculator.