This is my code , I have problems with making a simple save. The message is when i trying to save
this is my table , I made a migration. All fields can be null
$table = $this->table('users'); $table->addColumn('first_name','string',array('limit'=>100)) ->addColumn('last_name','string',array('limit'=>100)) ->addColumn('email','string',array('limit'=>100)) ->addColumn('password','string') ->addColumn('role','enum',array('values'=>'admin,user')) ->addColumn('active','boolean') ->addColumn('created','datetime') ->addColumn('modified','datetime') ->create();
this is my request data
[ 'first_name' => 'wewe', 'last_name' => 'wewe', 'email' => 'wewe@wee.com', 'password' => 'wewewe', 'role' => 'admin', 'active' => '0' ]
but if i use print_r ($user->errors()); i get this
Array ( [firts_name] => Array ( [_required] => This field is required ) )
the field is required…
my column name is “firts_name”, its a typing error. i want to die