public function setUpConstraints(&$options)
    {
        $constraints = $this->validator->arrayGet($options, 'constraints');
        $model       = $this->config->getDataModel();

        //set up and check the constraints
        if (is_array($constraints) && sizeof($constraints)) {
            $validConstraints = array();

            //iterate over the constraints and only include the valid ones
            foreach ($constraints as $field => $rel) {
                //check if the supplied values are strings and that their methods exist on their respective models
                if (is_string($field) && is_string($rel) && method_exists($model, $field)) {
                    $validConstraints[$field] = $rel;
                }
            }

            $options['constraints'] = $validConstraints;
        }
    }