Use a regex to validate the naming convention the branch should follow. If it's not correct, it fails.