MISP/app/Model/TemplateElementAttribute.php

35 lines
803 B
PHP
Raw Normal View History

<?php
App::uses('AppModel', 'Model');
/**
* TemplateElementAttribute 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(
'rule' => 'notEmpty',
'message' => 'Please enter a Name',
),
'description' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a Description',
),
'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();
}
}