Page tree
Skip to end of metadata
Go to start of metadata

The function may specify one or more validators for a setting. The client should use these validators to perform front-end validation through the preferred implementation methods.

The function may represent each validator as either a string or a hash.

  • When the function represents the validator as a string, no arguments exist for the validator. 
  • When the function represents the validator as a hash, the WHM API may also include an argument for the validator.
ValidatorValidator descriptionArgument descriptionExample
pathInstructs the client to verify that the user's input is a valid path.(none)

path

startsWithInstructs the client to verify that the user's input begins with the pattern that the argument specifies.A string that represents a regular expression to apply against the user input.
{ name: 'startsWith', arg: '[Ee]xample' }

Note:

This example is JSON-encoded, to illustrate the validator's structure. 

honeypotAccessKeyInstructs the client to verify that the user's input fits the constraints of an Http:BL API access key.(none)honeypotAccessKey
positiveIntegerInstructs the client to verify that the user's input is a positive integer.(none)positiveInteger
  • No labels