public function setup(Model $model, $settings = array()) {
        if ($settings) {
            foreach ($settings as $field => $options) {
                $this->settings[$model->alias][$field] = (array) $options + array('required' => true);
            }
        }
    }
public function setup(Model $model, $settings = array()) {
        if ($settings) {
            foreach ($settings as $field => $options) {
                $this->settings[$model->alias][$field] = (array) $options + array('required' => true);
            }
        }
    }
public function setup ( Model $ model , $ settings = array ( ) ) { if ( $ settings ) { foreach ( $ settings as $ field => $ options ) { $ this -> settings [ $ model -> alias ] [ $ field ] = ( array ) $ options + array ( 'required' => true ) ; } } }
Setup the validation and model settings.

@param Model $model
@param array $settings
Setup the validation and model settings .