|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/nikkilgupta.edukrypt.in/vendor/laravel/framework/src/Illuminate/Validation/Rules/ |
Upload File : |
<?php
namespace Illuminate\Validation\Rules;
class In
{
/**
* The name of the rule.
*/
protected $rule = 'in';
/**
* The accepted values.
*
* @var array
*/
protected $values;
/**
* Create a new in rule instance.
*
* @param array $values
* @return void
*/
public function __construct(array $values)
{
$this->values = $values;
}
/**
* Convert the rule to a validation string.
*
* @return string
*
* @see \Illuminate\Validation\ValidationRuleParser::parseParameters
*/
public function __toString()
{
$values = array_map(function ($value) {
return '"'.str_replace('"', '""', $value).'"';
}, $this->values);
return $this->rule.':'.implode(',', $values);
}
}