📦
Schema
  • Getting Started
  • Documents
    • Basics
      • Extend
    • Any
      • Label
      • Default
      • Required
      • Pipe
      • Validate
    • Array
      • Length
      • Max
      • Min
      • Items
    • Boolean
    • Date
      • Max
      • Min
    • Number
      • Max
      • Min
      • Multiple
      • Integer
      • Port
      • Positive
      • Precision
    • Object
      • Length
      • Max
      • Min
      • Keys
    • String
      • Alphanum
      • Credit Card
      • Email
      • Enum
      • IP Address
      • Length
      • Max
      • Min
      • Numeral
      • Regex
      • Token
  • Source Code
Powered by GitBook
On this page

Was this helpful?

  1. Documents
  2. Any

Label

This method will set a label that can be used in validation error details and messages

import Schema from "@rapidom/schema";

const Validator = Schema.number().label("age");

Schema types array & object will override the given type labels in items & keys methods

PreviousAnyNextDefault

Last updated 3 years ago

Was this helpful?