mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
Merge pull request #185 from AchoArnold/patch-1
Makes the data parameter optional in the constructor
This commit is contained in:
commit
971501551c
@ -86,7 +86,7 @@ class Validator
|
||||
* @param string $langDir
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct($data, $fields = array(), $lang = null, $langDir = null)
|
||||
public function __construct($data = array(), $fields = array(), $lang = null, $langDir = null)
|
||||
{
|
||||
// Allows filtering of used input fields against optional second array of field names allowed
|
||||
// This is useful for limiting raw $_POST or $_GET data to only known fields
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user