Is there any reason why min/max value are limited to the following?
[9999999999999]
- Min is too big (maximum is 2147483647)
I need to add ISBN numbers which are 13-digits. Is there a reason for this min/max length, and can it be increased?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityNumbers have certain limits in computer systems and storing (as well as working with) exceptionally large ones is cumbersome.
In the database, the int
(integer, a whole number) is limited to a range from -2147483648 to 2147483647. A bigint
can range from -9223372036854775808 to 9223372036854775807 but is less common. And I don't think Craft uses bigint
s anywhere.
I know it's purely numerical, but could your ISBN numbers use a text field? Unless you're doing math on it then this should suffice. If you really want you could a new fieldtype that validates an ISBN number but saves as a varchar
in the DB.
/^\d{13}$/
.