Validate the date is after a given date.

@param string $attribute
@param mixed  $value
@param array  $parameters

@return bool
326943
protected function validateAfter($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'after');

        if ($format = $this->getDateFormat($attribute)) {
            return $this->validateAfterWithFormat($format, $value, $parameters);
        }

        if (!($date = strtotime($parameters[0]))) {
            return strtotime($value) > strtotime($this->getValue($parameters[0]));
        } else {
            return strtotime($value) > $date;
        }
    }
1364971
protected function validateDimensions( $attribute, $value, $parameters )
	{
		if ( !$this->isAValidFileInstance( $value ) || !$sizeDetails = getimagesize( $value->getRealPath() ) )
		{
			return false;
		}

		$this->requireParameterCount( 1, $parameters, 'dimensions' );

		list( $width, $height ) = $sizeDetails;

		$parameters = $this->parseNamedParameters( $parameters );

		if ( isset( $parameters['width'] ) && $parameters['width'] != $width || isset( $parameters['min_width'] ) && $parameters['min_width'] > $width || isset( $parameters['max_width'] ) && $parameters['max_width'] < $width || isset( $parameters['height'] ) && $parameters['height'] != $height || isset( $parameters['min_height'] ) && $parameters['min_height'] > $height || isset( $parameters['max_height'] ) && $parameters['max_height'] < $height )
		{
			return false;
		}

		if ( isset( $parameters['ratio'] ) )
		{
			list( $numerator, $denominator ) = array_pad( sscanf( $parameters['ratio'], '%d/%d' ), 2, 1 );

			return $numerator / $denominator == $width / $height;
		}

		return true;
	}
278044
protected function _validate_date($value, $parameters)
    {
        $timestamp = is_numeric($value) ? $value : strtotime($value);
        if ($timestamp === false) {
            return null;
        }

        if (isset($parameters[0])) {
            if ($parameters[0] === 'start') {
                return date('Y-m-d', $timestamp) . ' 00:00:00';
            } elseif ($parameters[0] === 'end') {
                return date('Y-m-d', $timestamp) . ' 23:59:59';
            } else {
                return date($parameters[0], $timestamp);
            }
        } else {
            return $value;
        }
    }
874925
protected function validateBefore($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'before');

        if ($format = $this->getDateFormat($attribute)) {
            return $this->validateBeforeWithFormat($format, $value, $parameters);
        }

        if (!($date = strtotime($parameters[0]))) {
            return strtotime($value) < strtotime($this->getValue($parameters[0]));
        } else {
            return strtotime($value) < $date;
        }
    }
1087134
public function validateRequiredWithout($attribute, $value, $parameters)
    {
        if ($this->anyFailingRequired($parameters)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
1134517
protected function validateAlphaDash( $attribute, $value )
	{
		if ( !is_string( $value ) && !is_numeric( $value ) )
		{
			return false;
		}

		return preg_match( '/^[\pL\pM\pN_-]+$/u', $value );
	}
414728
protected function validateIban($attribute, $value, $parameters)
    {
        // Since IBAN's has different lengths depending on which country
        // the IBAN it comes from. We unfortunately needs this rather ugly
        // array with country codes and a value which corrosponds to the length
        // of the IBAN in that given country
        $countryIbanLengths = [
            'AL' => 28, 'AD' => 24, 'AT' => 20, 'AZ' => 28, 'BH' => 22, 'BE' => 16, 'BA' => 20, 'BR' => 29,
            'BG' => 22, 'CR' => 21, 'HR' => 21, 'CY' => 28, 'CZ' => 24, 'DK' => 18, 'DO' => 28, 'TL' => 23,
            'EE' => 20, 'FO' => 18, 'FI' => 18, 'FR' => 27, 'GE' => 22, 'DE' => 22, 'GI' => 23, 'GR' => 27,
            'GL' => 18, 'GT' => 28, 'HU' => 28, 'IS' => 26, 'IE' => 22, 'IL' => 23, 'IT' => 27, 'JO' => 30,
            'KZ' => 20, 'XK' => 20, 'KW' => 30, 'LV' => 21, 'LB' => 28, 'LI' => 21, 'LT' => 20, 'LU' => 20,
            'MK' => 19, 'MT' => 31, 'MR' => 27, 'MU' => 30, 'MC' => 27, 'MD' => 24, 'ME' => 22, 'NL' => 18,
            'NO' => 15, 'PK' => 24, 'PS' => 29, 'PL' => 28, 'PT' => 25, 'QA' => 29, 'RO' => 24, 'SM' => 27,
            'SA' => 24, 'RS' => 22, 'SK' => 24, 'SI' => 19, 'ES' => 24, 'SE' => 24, 'CH' => 21, 'TN' => 24,
            'TR' => 26, 'AE' => 23, 'GB' => 22, 'VG' => 24, 'DZ' => 24, 'AO' => 25, 'BJ' => 28, 'BF' => 27,
            'BI' => 16, 'CM' => 27, 'CV' => 25, 'IR' => 26, 'CI' => 28, 'MG' => 27, 'ML' => 28, 'MZ' => 25,
            'SN' => 28, 'UA' => 29,
        ];

        // Prepare string for validation
        $value = str_replace(' ', '', strtoupper($value));

        // Grab country of IBAN
        $countryCode = substr($value, 0, 2);

        // Retrieve IBAN length
        $countryIbanLength = ! empty($countryIbanLengths[$countryCode]) ? $countryIbanLengths[$countryCode] : 0;

        // Validate IBAN length
        if ($countryIbanLength == 0 || strlen($value) != $countryIbanLength) {
            return false;
        }

        // Generate data for later checksum calculation
        $checksumData = [];
        foreach (range('A', 'Z') as $letter) {
            $checksumData[$letter] = strval($letter);
        }

        // Prepare for generation of checksum
        $value = substr($value, 4).substr($value, 0, 4);
        $value = str_replace(array_keys($checksumData), array_values($checksumData), $value);

        // Generate checksum
        $checksum = intval($value[0]);
        for ($i = 1; $i < strlen($value); $i++) {
            $checksum *= 10;
            $checksum += intval($value[$i]);
            $checksum %= 97;
        }

        // Verify checksum
        return $checksum == 1;
    }
842320
protected function validateBic($attribute, $value, $parameters)
    {
        // Use provided regex or use fallback
        $pattern = ! empty($parameters[0]) ? $parameters[0] : '/^[A-Za-z]{4,} ?[A-Za-z]{2,} ?[A-Za-z0-9]{2,} ?([A-Za-z0-9]{3,})?$/';

        return (bool) preg_match($pattern, $value);
    }
1073461
public function validateBefore($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'before');

        return $this->compareDates($attribute, $value, $parameters, '<');
    }
868516
public function validateDimensions($attribute, $value, $parameters)
    {
        if ($this->isValidFileInstance($value) && $value->getClientMimeType() === 'image/svg+xml') {
            return true;
        }

        if (! $this->isValidFileInstance($value) || ! $sizeDetails = @getimagesize($value->getRealPath())) {
            return false;
        }

        $this->requireParameterCount(1, $parameters, 'dimensions');

        [$width, $height] = $sizeDetails;

        $parameters = $this->parseNamedParameters($parameters);

        if ($this->failsBasicDimensionChecks($parameters, $width, $height) ||
            $this->failsRatioCheck($parameters, $width, $height)) {
            return false;
        }

        return true;
    }
692707
public function validateRequiredWithoutAll($attribute, $value, $parameters)
    {
        if ($this->allFailingRequired($parameters)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
1238146
protected function validateRequiredWith($attribute, $value, $parameters)
    {
        if (! $this->allFailingRequired($parameters)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
374737
public function validateHoneytime($attribute, $value, $parameters)
    {
        if ($this->disabled) {
            return true;
        }
        
        // Get the decrypted time
        $value = $this->decryptTime($value);

        // The current time should be greater than the time the form was built + the speed option
        return ( is_numeric($value) && time() > ($value + $parameters[0]) );
    }
352244
public function validateVideoLink($attribute, $value, $parameters, $validator)
    {
        return preg_match($this->youtubeRegex, $value) || preg_match($this->vimeoRegex, $value);
    }
532612
public function validateMimes($attribute, $value, $parameters)
    {
        if (! $this->isValidFileInstance($value)) {
            return false;
        }

        if ($this->shouldBlockPhpUpload($value, $parameters)) {
            return false;
        }

        return $value->getPath() !== '' && in_array($value->guessExtension(), $parameters);
    }
758943
protected function validateSame($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'same');

        $other = Arr::get($this->data, $parameters[0]);

        return (isset($other) && $value == $other);
    }
687301
public function validateInArray($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'in_array');

        $explicitPath = ValidationData::getLeadingExplicitAttributePath($parameters[0]);

        $attributeData = ValidationData::extractDataFromPath($explicitPath, $this->data);

        $otherValues = Arr::where(Arr::dot($attributeData), function ($value, $key) use ($parameters) {
            return Str::is($parameters[0], $key);
        });

        return in_array($value, $otherValues);
    }