Skip to content

Commit 6788363

Browse files
committed
isByteLength() counts UTF-8 bytes, closes #615
1 parent cd92fb3 commit 6788363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Passing anything other than a string is an error.
6161
- **isBase64(str)** - check if a string is base64 encoded.
6262
- **isBefore(str [, date])** - check if the string is a date that's before the specified date.
6363
- **isBoolean(str)** - check if a string is a boolean.
64-
- **isByteLength(str, options)** - check if the string's length (in bytes) falls in a range.`options` is an object which defaults to `{min:0, max: undefined}`.
64+
- **isByteLength(str, options)** - check if the string's length (in UTF-8 bytes) falls in a range. `options` is an object which defaults to `{min:0, max: undefined}`.
6565
- **isCreditCard(str)** - check if the string is a credit card.
6666
- **isCurrency(str, options)** - check if the string is a valid currency amount. `options` is an object which defaults to `{symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_space_after_digits: false }`.
6767
- **isDataURI(str)** - check if the string is a [data uri format](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs).

0 commit comments

Comments
 (0)