Using ActiveRecord you might define a class like this:
class Contact
{
private String _name;
public String Name
{
get { return _name; }
set
It really depends on how complex your domain logic is. For example if I was writing a simple blog then active record will be fine, mostly the application is saving and loading data. Its simple and active record pattern is the right tool for the job.
However if I was writing software for a shipping company in which there are many complex business rules and processes then using the repository pattern, along with other Domain Driven Design patterns will provide at much more maintainable code in the long run.
Using domain driven design you would use the specification pattern to achieve your validation.