Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16659 anikendra 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * SearchAnalytic Model
5
 *
6
 */
7
class SearchAnalytic extends AppModel {
8
 
9
/**
10
 * Display field
11
 *
12
 * @var string
13
 */
14
	public $displayField = 'name';
15
 
16
/**
17
 * Validation rules
18
 *
19
 * @var array
20
 */
21
	public $validate = array(
22
		'user_id' => array(
23
			'numeric' => array(
24
				'rule' => array('numeric'),
25
				//'message' => 'Your custom message here',
26
				//'allowEmpty' => false,
27
				//'required' => false,
28
				//'last' => false, // Stop validation after this rule
29
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
30
			),
31
		),
32
		'sku' => array(
33
			'numeric' => array(
34
				'rule' => array('numeric'),
35
				//'message' => 'Your custom message here',
36
				//'allowEmpty' => false,
37
				//'required' => false,
38
				//'last' => false, // Stop validation after this rule
39
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
40
			),
41
		),
42
		'name' => array(
43
			'notEmpty' => array(
44
				'rule' => array('notEmpty'),
45
				//'message' => 'Your custom message here',
46
				//'allowEmpty' => false,
47
				//'required' => false,
48
				//'last' => false, // Stop validation after this rule
49
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
50
			),
51
		),
52
		'rank' => array(
53
			'numeric' => array(
54
				'rule' => array('numeric'),
55
				//'message' => 'Your custom message here',
56
				//'allowEmpty' => false,
57
				//'required' => false,
58
				//'last' => false, // Stop validation after this rule
59
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
60
			),
61
		),
62
	);
63
}