> For the complete documentation index, see [llms.txt](https://racoon-js.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://racoon-js.gitbook.io/en/api/number/allowstring.md).

# allowString

allowString()

## Effect

Allow the detected value to be a ***string style number.***

> **NOTE**
>
> A String that matches the regular expression `/^[+-]?\d.?\d$/` is a *string style number.* Such as '123', '-123', '0.123', '.123'.

## Since

\>=1.3.0

## Arguments

None

## Example

```javascript
const schema1 = racoon.number();
schema.validate('123'); // fail

const schema2 = racoon.number().allowString();
schema.validate('123'); // pass, return 123
schema.validate('.123'); // pass, return 0.123
schema.validate('-123'); // pass, return -123
schema.validate('+123'); // pass, return 123
```
