Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function validate($validator) |
||
40 | { |
||
41 | $value = $this->Value() + 0; |
||
42 | |||
43 | if(is_int($value)) { |
||
44 | return true; |
||
45 | } |
||
46 | |||
47 | $validator->validationError( |
||
48 | $this->name, |
||
49 | _t( |
||
50 | 'Checkout.VALIDATION', '{value} is not a valid number, only whole numbers can be accepted for this field', |
||
51 | array('value' => $value) |
||
52 | ), |
||
53 | "validation" |
||
54 | ); |
||
55 | |||
56 | return false; |
||
57 | } |
||
67 |