throw new \InvalidArgumentException('Account number must be an 8-digit number');
}
// Validate the sort code.
if (!preg_match('/^\d{2}-\d{2}-\d{2}$/', $sortCode)) {
throw new \InvalidArgumentException('Sort code must be in the format 00-00-00');
}
}
}
```
Helper methods can also be added to a value object as long as they don't modify the state of the object, such as getting the raw sort code without the separating dashes or performing further checks on the input values.