areInputsValid to use anyMatch
Bugfix