Using older version of Indicative or @adonisjs/validator?. Click here to access the old version documentation.



Enforces the field value to be a valid string.

The values transfered over HTTP are alawys string, which means this validation will always pass.

However, this validation rule is helpful for raw JSON requests, since after parsing the JSON strings, the server will get the actual content types and not a string.

In short, the rule has no impact for application/x-www-form-urlencoded, but helpful for application/json content type.