MISP/app/Model/TemplateElementAttribute.php

35 lines
773 B
PHP
Raw Normal View History

<?php
App::uses('AppModel', 'Model');
class TemplateElementAttribute extends AppModel {
public $actsAs = array('Containable');
public $belongsTo = array('TemplateElement');
2014-06-12 13:59:54 +02:00
public $validate = array(
'name' => array(
'valueNotEmpty' => array(
'rule' => array('valueNotEmpty'),
),
2014-06-12 13:59:54 +02:00
),
'description' => array(
'valueNotEmpty' => array(
'rule' => array('valueNotEmpty'),
),
2014-06-12 13:59:54 +02:00
),
'category' => array(
'rule' => array('comparison', '!=', 'Select Category'),
'message' => 'Please choose a category.'
),
'type' => array(
'rule' => array('comparison', '!=', 'Select Type'),
'message' => 'Please choose a type.'
),
);
public function beforeValidate($options = array()) {
parent::beforeValidate();
}
}