trait ConfiguresPrompts

Methods

void
configurePrompts(InputInterface $input)

Configure the prompt fallbacks.

PResult
promptUntilValid(PResult $prompt, bool|string $required, null|PResult): mixed $validate)

Prompt the user until the given validation callback passes.

?string
validatePrompt(mixed $value, mixed $rules)

Validate the given prompt value using the validator.

getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])

Get the validator instance that should be used to validate prompts.

array
validationMessages()

Get the validation messages that should be used during prompt validation.

array
validationAttributes()

Get the validation attributes that should be used during prompt validation.

Details

at line 32
protected void configurePrompts(InputInterface $input)

Configure the prompt fallbacks.

Parameters

InputInterface $input

Return Value

void

at line 149
protected PResult promptUntilValid(PResult $prompt, bool|string $required, null|PResult): mixed $validate)

Prompt the user until the given validation callback passes.

Parameters

PResult $prompt
bool|string $required
null|PResult): mixed $validate

Return Value

PResult

at line 185
protected ?string validatePrompt(mixed $value, mixed $rules)

Validate the given prompt value using the validator.

Parameters

mixed $value
mixed $rules

Return Value

?string

at line 220
protected Validator getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])

Get the validator instance that should be used to validate prompts.

Parameters

mixed $field
mixed $value
mixed $rules
array $messages
array $attributes

Return Value

Validator

at line 235
protected array validationMessages()

Get the validation messages that should be used during prompt validation.

Return Value

array

at line 245
protected array validationAttributes()

Get the validation attributes that should be used during prompt validation.

Return Value

array