Fixes #5702: Parenthesis should be automatically added to `Validator::whenClient` to avoid js error