public function minDate($date = 0, $format = null, $message = null)
    {
        if (empty($format)) {
            $format = $this->_getDefaultDateFormat();
        }
        if (is_numeric($date)) {
            $date = new \DateTime($date . ' days'); // Days difference from today
        } else {
            $fieldValue = $this->_getVal($date);
            $date = ($fieldValue == FALSE) ? $date : $fieldValue;

            $date = \DateTime::createFromFormat($format, $date);
        }

        $this->setRule(__FUNCTION__, function($val, $args)
                       {
                           $format = $args[1];
                           $limitDate = $args[0];

                           return ($limitDate > \DateTime::createFromFormat($format, $val)) ? FALSE : TRUE;
                       }, $message, array($date, $format));
        return $this;
    }
public function minDate($date = 0, $format = null, $message = null)
    {
        if (empty($format)) {
            $format = $this->_getDefaultDateFormat();
        }
        if (is_numeric($date)) {
            $date = new \DateTime($date . ' days'); // Days difference from today
        } else {
            $fieldValue = $this->_getVal($date);
            $date = ($fieldValue == FALSE) ? $date : $fieldValue;

            $date = \DateTime::createFromFormat($format, $date);
        }

        $this->setRule(__FUNCTION__, function($val, $args)
                       {
                           $format = $args[1];
                           $limitDate = $args[0];

                           return ($limitDate > \DateTime::createFromFormat($format, $val)) ? FALSE : TRUE;
                       }, $message, array($date, $format));
        return $this;
    }
public function minDate ( $ date = 0 , $ format = null , $ message = null ) { if ( empty ( $ format ) ) { $ format = $ this -> _getDefaultDateFormat ( ) ; } if ( is_numeric ( $ date ) ) { $ date = new \ DateTime ( $ date . ' days' ) ; // Days difference from today } else { $ fieldValue = $ this -> _getVal ( $ date ) ; $ date = ( $ fieldValue == FALSE ) ? $ date : $ fieldValue ; $ date = \ DateTime :: createFromFormat ( $ format , $ date ) ; } $ this -> setRule ( __FUNCTION__ , function ( $ val , $ args ) { $ format = $ args [ 1 ] ; $ limitDate = $ args [ 0 ] ; return ( $ limitDate > \ DateTime :: createFromFormat ( $ format , $ val ) ) ? FALSE : TRUE ; } , $ message , array ( $ date , $ format ) ) ; return $ this ; }
Field has to be a date later than or equal to X.

@param   string|int  $date       Limit date
@param   string      $format     Date format
@param   string      $message
@return FormValidator
Field has to be a date later than or equal to X .