Rules and validation

There is already an rule and message class so you don't have to create a
new one.