Overview
Route Schema
s.route()
A string schema that represents a route path in your application. Route values are validated against all router modules (records with .router() or created with s.router()).
Use s.route() instead of s.keyOf() when you want to reference routes from page routers, as it automatically validates against all router modules in your application.
See:
/docs/page-routerMethods:
.include: method
Constrain valid routes to those matching a regular expression pattern. Only routes that match this pattern will be considered valid.
s.route().include(/^\/api\//)
.exclude: method
Exclude routes matching a regular expression pattern. Routes that match this pattern will be considered invalid.
s.route().exclude(/^\/admin\//)
.validate: method
Custom validation function
.nullable: method
Allow null values