<?php

class Foo extends \DuoWorks\Model
{
	protected $columns = array('id','foo','bar');
	
	public static function constraints()
	{
		return array(
			// 'foo' is numeric and may not be omitted
			'foo' => array('required', 'numeric' => _('Only numbers allowed.')),
			// 'bar' Should be at most 10 characters long
			'bar' => 'length:-10'
		);
	}
}
