-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.ao_form_resume.php
59 lines (46 loc) · 1.52 KB
/
class.ao_form_resume.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
class AOFormResume extends Zend_Form {
public function init ( ) {
parent::init();
$this->_addFormElements();
}
protected function _addFormElements()
{
$this->setName('AOFormResume');
$this->addElement($this->_getResume());
}
// Form Fields //
protected function _getResume()
{
$name = 'resume';
$options = [
'name' => $name,
'required' => true,
'filters' => [
['StringTrim'],
// ['PregReplace', [
// 'match' => '/[^A-Za-z0-9 \'\-\/,.<>"&]/',
// 'replace' => ''
// ]]
],
'validators' => [
['NotEmpty', false, [
'messages' => [Zend_Validate_NotEmpty::IS_EMPTY => "Required"]
]],
['StringLength', false, [
'min' => 0,
'max' => 100000,
'messages' => [
Zend_Validate_StringLength::TOO_SHORT => "Entry is too short.",
Zend_Validate_StringLength::TOO_LONG => "Entry is too long.",
]
]],
// ['Regex', false, [
// 'pattern' => '/^[A-Za-z0-9 \'\-\/,.<>"&]+$/',
// 'messages' => [Zend_Validate_Regex::NOT_MATCH => "Invalid characters."]
// ]]
],
];
return new Zend_Form_Element_Textarea($name, $options);
}
}