Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR MemberDatetimeOptionsetField::validate() now passes in $validat…

…or argument instead of getting it from the form, which is how other FormFields work like CompositeField
  • Loading branch information...
commit 852ffcf492dd82b227a645dcd05e90d0450e7903 1 parent 3c70ea4
@halkyon halkyon authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 forms/MemberDatetimeOptionsetField.php
View
5 forms/MemberDatetimeOptionsetField.php
@@ -89,12 +89,11 @@ function setValue($value) {
}
}
- function validate() {
+ function validate($validator) {
$value = isset($_POST[$this->name . '_custom']) ? $_POST[$this->name . '_custom'] : null;
if(!$value) return true; // no custom value, don't validate
// Check that the current date with the date format is valid or not
- $validator = $this->form ? $this->form->getValidator() : null;
require_once 'Zend/Date.php';
$date = Zend_Date::now()->toString($value);
$valid = Zend_Date::isDate($date, $value);
@@ -107,4 +106,4 @@ function validate() {
return false;
}
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.