6 months ago

Problem with query insert into, laravel 5.5

Posted 6 months ago by daniel21gt

I have the following code.


$this->validate($request,['user_id', 'gobe_id'=>'required', 'alcal_id'=>'required', 'conse_id'=>'required', 'asam_id'=>'required', 'nombre'=>'required', 'apellido'=>'required', 'cedula'=>'required|max:11|unique:usuarios', 'telefonos'=>'required','direccion'=>'required', 'barrio'=>'required', 'lugar_votacion'=>'required', 'mesa_votacion'=>'required', 'email'=>'required|unique:usuarios', 'ciudad'=>'required', 'estado']);



When I enter this ID number 4521511210

I get this error

"SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'cedula' at row 1 (SQL: insert into usuarios (user_id, usuario_ad, nombre, apellido, telefonos, cedula, barrio, lugar_votacion, mesa_votacion, email, ciudad, direccion, gobe_id, alcal_id, conse_id, asam_id, updated_at, created_at) values (3, danielad, velentina, sarmiento, 5142621, 4521511210, cuba, cuba, 32, [email protected], Dosquebradas, cra 12 45 65, 3, 3, 1, 1, 2019-03-08 02:30:44, 2019-03-08 02:30:44))

Please sign in or create an account to participate in this conversation.