Validation method for the Sweet Captcha input values.
@param  [type] $attribute  [description]
@param  [type] $value      [description]
@param  [type] $parameters [description]
@return boolean
431613
public function validateSweetcaptcha($attribute, $value, $parameters)
    {

        if (Input::has('scvalue'))
        {	
        	$sweetcaptcha = app()->make('SweetCaptcha');        	
        	return $sweetcaptcha->check(array('sckey' => $value, 'scvalue' => Input::get('scvalue'))) == "true";
    	}
    	else
    		return false;
    }
1294049
public function validateIn($attribute, $value, $parameters)
    {
        if (is_array($value) && $this->hasRule($attribute, 'Array')) {
            foreach ($value as $element) {
                if (is_array($element)) {
                    return false;
                }
            }

            return count(array_diff($value, $parameters)) === 0;
        }

        return ! is_array($value) && in_array((string) $value, $parameters);
    }
1198635
public function validateImageSize($attribute, $value, $parameters)
    {
        $image = $this->getImagePath($value);

        // Get the image dimension info, or fail.

        $image_size = @getimagesize($image);
        if ($image_size === false) {
            return false;
        }

        // If only one dimension rule is passed, assume it applies to both height and width.

        if (!isset($parameters[1])) {
            $parameters[1] = $parameters[0];
        }

        // Parse the parameters.  Options are:
        //
        // 	"300" or "=300"   - dimension must be exactly 300 pixels
        // 	"<300"            - dimension must be less than 300 pixels
        // 	"<=300"           - dimension must be less than or equal to 300 pixels
        // 	">300"            - dimension must be greater than 300 pixels
        // 	">=300"           - dimension must be greater than or equal to 300 pixels

        $width_check = $this->checkDimension($parameters[0], $image_size[0]);
        $height_check = $this->checkDimension($parameters[1], $image_size[1]);

        return $width_check['pass'] && $height_check['pass'];
    }
505852
protected function validateBefore($attribute, $value, $parameters)
	{
		if ( ! ($date = strtotime($parameters[0])))
		{
			return strtotime($value) < strtotime($this->getValue($parameters[0]));
		}
		else
		{
			return strtotime($value) < $date;
		}
	}
1133050
protected function validateDate($attribute, $value)
    {
        if ($value instanceof DateTime) {
            return true;
        }

        if (strtotime($value) === false) {
            return false;
        }

        $date = date_parse($value);

        return checkdate($date['month'], $date['day'], $date['year']);
    }
758943
protected function validateSame($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'same');

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

        return (isset($other) && $value == $other);
    }
923412
protected function validateMax( $attribute, $value, $parameters )
	{
		$this->requireParameterCount( 1, $parameters, 'max' );

		if ( $value instanceof UploadedFile && !$value->isValid() )
		{
			return false;
		}

		return $this->getSize( $attribute, $value ) <= $parameters[0];
	}
381539
public function validateEmail($attribute, $value)
    {
        if (! is_string($value) && ! (is_object($value) && method_exists($value, '__toString'))) {
            return false;
        }

        return (new EmailValidator)->isValid($value, new RFCValidation);
    }
695137
protected function validateDistinct( $attribute, $value, $parameters )
	{
		$attributeName = $this->getPrimaryAttribute( $attribute );

		$explicitPath = $this->getLeadingExplicitAttributePath( $attributeName );

		$attributeData = $this->extractDataFromPath( $explicitPath );

		$data = Arr::where( Arr::dot( $attributeData ), function ( $key ) use ( $attribute, $attributeName )
		{
			return $key != $attribute && Str::is( $attributeName, $key );
		} );

		return !in_array( $value, array_values( $data ) );
	}
1155221
protected function validateDateFormat($attribute, $value, $parameters)
	{
		$parsed = date_parse_from_format($parameters[0], $value);

		return $parsed['error_count'] === 0 && $parsed['warning_count'] === 0;
	}
296836
protected function validate($attribute, $value)
    {
        $properties = array_merge($this->baseProperties, $this->properties);

        return in_array($attribute, $properties, true);
    }
1038287
public function validateImageAspect($attribute, $value, $parameters)
    {
        $image = $this->getImagePath($value);

        // Get the image dimension info, or fail.

        $image_size = @getimagesize($image);
        if ($image_size === false) {
            return false;
        }

        $image_width = $image_size[0];
        $image_height = $image_size[1];

        // Parse the parameter(s).  Options are:
        //
        // 	"0.75"   - one param: a decimal ratio (width/height)
        // 	"3,4"    - two params: width, height
        //
        // If the first value is prefixed with "~", the orientation doesn't matter, i.e.:
        //
        // 	"~3,4"   - would accept either "3:4" or "4:3" images

        $both_orientations = false;

        if (substr($parameters[0], 0, 1) === '~') {
            $parameters[0] = substr($parameters[0], 1);
            $both_orientations = true;
        }

        if (count($parameters) === 1) {
            $aspect_width = $parameters[0];
            $aspect_height = 1;
        } else {
            $aspect_width = (int) $parameters[0];
            $aspect_height = (int) $parameters[1];
        }

        if ($aspect_width === 0 || $aspect_height === 0) {
            throw new RuntimeException('Aspect is zero or infinite: ' . $parameters[0]);
        }

        $check = ($image_width * $aspect_height) / $aspect_width;

        if ((int) round($check) === $image_height) {
            return true;
        }

        if ($both_orientations) {
            $check = ($image_width * $aspect_width) / $aspect_height;
            if ((int) round($check) === $image_height) {
                return true;
            }
        }

        return false;
    }
910524
protected function validateRegex($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'regex');

        return preg_match($parameters[0], $value);
    }
1322322
public function validateMinChecked($attribute, $value, $parameters)
    {
        $input = Input::get($attribute);

        if (!isset($parameters[0]) OR ! is_numeric($parameters[0])) {
            return true;
        }
        if (count($input) < $parameters[0]) {
            $this->setCustomMessages([$attribute => trans('antares/customfields::validator.checkboxes.min-checked')]);
            $this->addFailure($attribute, $attribute, []);
        }

        return true;
    }
134283
protected function validateIsbn13($attribute, $value, $parameters)
    {
        // Prepare value for validation
        $value = str_replace([' ', '-', '‐', '.'], '', $value);

        // Make sure value is exactly 13 characters
        // and that all the characters are numeric
        if (strlen($value) != 13 || ! is_numeric($value)) {
            return false;
        }

        // Grab "check digit" for later use
        $checkDigit = substr($value, -1);

        // Generate checksum
        $sum = $value[0] + ($value[1] * 3) + $value[2] + ($value[3] * 3) +
                $value[4] + ($value[5] * 3) + $value[6] + ($value[7] * 3) +
                $value[8] + ($value[9] * 3) + $value[10] + ($value[11] * 3);

        // Grab "check digit" from checksum for later verification
        $checksumCheckDigit = 10 - ($sum % 10);
        $checksumCheckDigit = ($checksumCheckDigit == 10) ? 0 : $checksumCheckDigit;

        return $checkDigit == $checksumCheckDigit;
    }
450554
public function validateUnique($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'unique');

        [$connection, $table] = $this->parseTable($parameters[0]);

        // The second parameter position holds the name of the column that needs to
        // be verified as unique. If this parameter isn't specified we will just
        // assume that this column to be verified shares the attribute's name.
        $column = $this->getQueryColumn($parameters, $attribute);

        [$idColumn, $id] = [null, null];

        if (isset($parameters[2])) {
            [$idColumn, $id] = $this->getUniqueIds($parameters);

            if (! is_null($id)) {
                $id = stripslashes($id);
            }
        }

        // The presence verifier is responsible for counting rows within this store
        // mechanism which might be a relational database or any other permanent
        // data store like Redis, etc. We will use it to determine uniqueness.
        $verifier = $this->getPresenceVerifierFor($connection);

        $extra = $this->getUniqueExtra($parameters);

        if ($this->currentRule instanceof Unique) {
            $extra = array_merge($extra, $this->currentRule->queryCallbacks());
        }

        return $verifier->getCount(
            $table, $column, $value, $id, $idColumn, $extra
        ) == 0;
    }
824244
protected function validateRequiredIf($attribute, $value, $parameters)
	{
		if ($parameters[1] == array_get($this->data, $parameters[0]))
		{
			return $this->validateRequired($attribute, $value);
		}

		return true;
	}