<p>Numbers have certain limits in computer systems and storing (as well as working with) exceptionally large ones is cumbersome.</p>

<p>In the <a href="http://dev.mysql.com/doc/refman/5.6/en/integer-types.html" rel="nofollow">database</a>, the <code>int</code> (integer, a whole number) is limited to a range from -2147483648 to 2147483647. A <code>bigint</code> can range from -9223372036854775808 to 9223372036854775807 but is less common. And I don't think Craft uses <code>bigint</code>s anywhere.</p>

<p>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 <code>varchar</code> in the DB.</p>

CC BY-SA 3.0
2015-07-19T22:14:14.407Z
Ah I see, thanks. My database knowledge is pretty poor so didn't realise this was a limitation of the db. I suppose a text field could do the trick, I can always check with Twig if it's numerical — I expect the alternative option you mention involves a plugin, and my php is nowhere near good enough!
Rob
CC BY-SA 3.0
2015-07-20T08:51:05.423Z
@Rob I can recommend Marion Newlevant's [Match Input](https://github.com/marionnewlevant/craft-mn_matchinput) plugin. It provides a text field that gets validated against custom RexEx patterns, which you define in its field settings. To match exactly 13 digits use this expression: `/^\d{13}$/`.
carlcs
CC BY-SA 3.0
2015-07-20T17:23:18.377Z
@carlcs Ah, sounds good will check it out. Thanks.
Rob
CC BY-SA 3.0
2015-07-19T22:00:16.320Z
2015-07-19T22:00:16.320Z
Rick
<p>Is there any reason why min/max value are limited to the following?</p>

<pre><code>[9999999999999]
- Min is too big (maximum is 2147483647)
</code></pre>

<p>I need to add <strong>ISBN</strong> numbers which are 13-digits. Is there a reason for this min/max length, and can it be increased?</p>

<field><fieldtypes><error>
Error: min/max value in number fields
# Error: min/max value in number fields

(Asked by: username_0 on 2015-07-19)

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?

**Tags:** field, fieldtypes, error

---

## 1 answers

### Answer by username_1 on 2015-07-19. Score: 3 | Accepted answer

Numbers have certain limits in computer systems and storing (as well as working with) exceptionally large ones is cumbersome.

In the [database](http://dev.mysql.com/doc/refman/5.6/en/integer-types.html), 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.

> **Comments:**
> **username_0**: Ah I see, thanks. My database knowledge is pretty poor so didn't realise this was a limitation of the db. I suppose a text field could do the trick, I can always check with Twig if it's numerical — I expect the alternative option you mention involves a plugin, and my php is nowhere near good enough!  
> **username_2**: @Rob I can recommend Marion Newlevant's [Match Input](https://github.com/marionnewlevant/craft-mn_matchinput) plugin. It provides a text field that gets validated against custom RexEx patterns, which you define in its field settings. To match exactly 13 digits use this expression: `/^\d{13}$/`.  
> **username_0**: @carlcs Ah, sounds good will check it out. Thanks.  

---

