mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-11 14:16:43 +00:00
There's two ways to signal that a validator emits invalidity on a control: 1. Its `validate()` method returns `false` 2. Its `validate()` method returns an object Option 2) allows validators to supply the `errors` object with additional data. Due to latest changes to `errorMessage` handling in validators, those messages would not be rendered anymore if a validator returns simply `false` instead of an object. The reason for that is because the code assumed that only option 2) is gonna happen. This commit ensures that error messages a displayed in both options.