Skip to content

Commit

Permalink
docs: notes about max number and string in data- attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
beholdr committed Sep 8, 2024
1 parent cdb8cc7 commit c6a6646
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/v3/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ interface MaskaDetail {
```
<!-- tabs:end -->

!> Please note that `data-` attributes only accept strings, so if you need to set complex values such as functions (e.g. for hooks) you cannot use `data-maska-` attributes for that.

?> Examples on this page use vanilla version of Maska. The framework specific versions have the same options, but should be passed in a different way: for example, as a directive value.


Expand Down Expand Up @@ -189,7 +191,7 @@ new MaskInput("input", {
```
<!-- tabs:end -->

?> Under the hood Maska uses [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) for number formatting.
?> Under the hood Maska uses the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) for number formatting. Therefore, the maximum number that can be formatted should be less than `9007199254740991`.

!> For some locales, such as `de` or `br`, which use a dot `.` as a thousand separator, you should manually format the initial value before passing it. For more information, please see [issue #225](https://github.com/beholdr/maska/issues/225).

Expand Down

0 comments on commit c6a6646

Please sign in to comment.