refactor: optimize error message concatenation in default_validator (#4685)