v.0.1
This commit is contained in:
46
vendor/illuminate/contracts/Validation/Factory.php
vendored
Normal file
46
vendor/illuminate/contracts/Validation/Factory.php
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Validation;
|
||||
|
||||
interface Factory
|
||||
{
|
||||
/**
|
||||
* Create a new Validator instance.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $rules
|
||||
* @param array $messages
|
||||
* @param array $customAttributes
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
public function make(array $data, array $rules, array $messages = [], array $customAttributes = []);
|
||||
|
||||
/**
|
||||
* Register a custom validator extension.
|
||||
*
|
||||
* @param string $rule
|
||||
* @param \Closure|string $extension
|
||||
* @param string|null $message
|
||||
* @return void
|
||||
*/
|
||||
public function extend($rule, $extension, $message = null);
|
||||
|
||||
/**
|
||||
* Register a custom implicit validator extension.
|
||||
*
|
||||
* @param string $rule
|
||||
* @param \Closure|string $extension
|
||||
* @param string|null $message
|
||||
* @return void
|
||||
*/
|
||||
public function extendImplicit($rule, $extension, $message = null);
|
||||
|
||||
/**
|
||||
* Register a custom implicit validator message replacer.
|
||||
*
|
||||
* @param string $rule
|
||||
* @param \Closure|string $replacer
|
||||
* @return void
|
||||
*/
|
||||
public function replacer($rule, $replacer);
|
||||
}
|
8
vendor/illuminate/contracts/Validation/ImplicitRule.php
vendored
Normal file
8
vendor/illuminate/contracts/Validation/ImplicitRule.php
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Validation;
|
||||
|
||||
interface ImplicitRule extends Rule
|
||||
{
|
||||
//
|
||||
}
|
22
vendor/illuminate/contracts/Validation/Rule.php
vendored
Normal file
22
vendor/illuminate/contracts/Validation/Rule.php
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Validation;
|
||||
|
||||
interface Rule
|
||||
{
|
||||
/**
|
||||
* Determine if the validation rule passes.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public function passes($attribute, $value);
|
||||
|
||||
/**
|
||||
* Get the validation error message.
|
||||
*
|
||||
* @return string|array
|
||||
*/
|
||||
public function message();
|
||||
}
|
13
vendor/illuminate/contracts/Validation/ValidatesWhenResolved.php
vendored
Normal file
13
vendor/illuminate/contracts/Validation/ValidatesWhenResolved.php
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Validation;
|
||||
|
||||
interface ValidatesWhenResolved
|
||||
{
|
||||
/**
|
||||
* Validate the given class instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function validateResolved();
|
||||
}
|
65
vendor/illuminate/contracts/Validation/Validator.php
vendored
Normal file
65
vendor/illuminate/contracts/Validation/Validator.php
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Validation;
|
||||
|
||||
use Illuminate\Contracts\Support\MessageProvider;
|
||||
|
||||
interface Validator extends MessageProvider
|
||||
{
|
||||
/**
|
||||
* Run the validator's rules against its data.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function validate();
|
||||
|
||||
/**
|
||||
* Get the attributes and values that were validated.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function validated();
|
||||
|
||||
/**
|
||||
* Determine if the data fails the validation rules.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function fails();
|
||||
|
||||
/**
|
||||
* Get the failed validation rules.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function failed();
|
||||
|
||||
/**
|
||||
* Add conditions to a given field based on a Closure.
|
||||
*
|
||||
* @param string|array $attribute
|
||||
* @param string|array $rules
|
||||
* @param callable $callback
|
||||
* @return $this
|
||||
*/
|
||||
public function sometimes($attribute, $rules, callable $callback);
|
||||
|
||||
/**
|
||||
* Add an after validation callback.
|
||||
*
|
||||
* @param callable|string $callback
|
||||
* @return $this
|
||||
*/
|
||||
public function after($callback);
|
||||
|
||||
/**
|
||||
* Get all of the validation error messages.
|
||||
*
|
||||
* @return \Illuminate\Support\MessageBag
|
||||
*/
|
||||
public function errors();
|
||||
}
|
Reference in New Issue
Block a user