I've started working with Laravel 4 Beta 2 and am running into a problem with the validation.
I have this route :
Route::post('inscription', function()
{
$rules = array(
array('nom' => 'required'),
array('passe' => 'required')
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails())
{
echo var_dump(Input::all());
$messages = $validator->messages();
print_R($messages->all());
}
});
And I get that when I enter values in my form :
array (size=2)
'nom' => string 'Dupont' (length=6)
'passe' => string 'monpasse' (length=8)
Array ( [0] => The 0 field is required. [1] => The 1 field is required. )
That tell me fields are required but there are values !