PluginComponent
  • Home
  • Get started
    • Get started
    • Callback event
    • BaseComponent
  • Components
    • Input
    • Jumbotron
    • Button
    • Container
  • AddProperties
    • Text
    • BackgroundColor
    • Padding
  • Extra functions
    • Validate
    • Color
  • Created with PluginComponent
Powered by GitBook
On this page
  • Types
  • Any()
  • .Number(min:number, max:number, def:number)
  • .NoEmpty(def:string)
  • .Int(min:number, max:number, def:number)
  1. Extra functions

Validate

Создает валидацию для текстовых полей

The .SetValidate() method is used to connect validation to the component. As an argument, you must specify a reference to the validation method with the call:

PluginComponents.Validate.Any()

It looks like this in the end:

local InputExapmle = PluginComponents.Component.Input.New()

.SetValidate(PluginComponents.Validate.Any())

Types

Any()

This is an empty method. It holds any values.

.Number(min:number, max:number, def:number)

Allows any number to be used. Between min to max

.NoEmpty(def:string)

Does not allow the field to be left blank. Outputs def if after empty.

.Int(min:number, max:number, def:number)

Allows only whole numbers to be used. Between min to max

PreviousExtra functionsNextColor

Last updated 3 years ago