My user registration form has a field for contact number (mobile number) which is 10 digits long. I used a normal integer field which gives me "Out of range" error
PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'field_mobile_number_value' at row 1: INSERT INTO {field_revision_field_mobile_number} (entity_type, entity_id, revision_id, bundle, delta, language, field_mobile_number_value) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => user [:db_insert_placeholder_1] => 26 [:db_insert_placeholder_2] => 26 [:db_insert_placeholder_3] => user [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 9841232323 ) in field_sql_storage_field_storage_write() (line 449 of C:\wamp\www\ANICBS\modules\field\modules\field_sql_storage\field_sql_storage.module).
There doesnt seem to be a field for long integers in Drupal core. How can I work around this?
I even tried changing the field type to "BIG INT" straight in the database. but the error presists.
you can try cck_phone module otherwise make it as text field and apply validation for it.