AdonisJS v6 is here. Learn more in our release blog post.

escape

The escape is sanitization rule to replace <, >, &, ', " and / with HTML entities.

import { schema, rules } from '@ioc:Adonis/Core/Validator'
{
username: schema.string([
rules.escape()
])
}