The following Constrains checks the data type :
Constraint | Inline | Class | Description |
---|---|---|---|
int | {id:int} |
IntRouteConstraint | Constrains a route parameter to represent only 32-bit integer values |
alpha | {id:alpha} |
AlphaRouteConstraint | Constrains a route parameter to contain only lowercase or uppercase letters A through Z in the English alphabet. |
bool | {id:bool} |
BoolRouteConstraint | Constrains a route parameter to represent only Boolean values. |