laravel / prompts

Beautiful and user-friendly forms for your command-line PHP applications.
https://laravel.com/docs/prompts
MIT License
533 stars 94 forks source link

Allow `select` and `search` "required" message to be customized. #84

Closed jessarcher closed 1 year ago

jessarcher commented 1 year ago

This PR improves the changes made in #73 so that the "required" validation message can be customized for select and search prompts when running non-interactively.

These two prompts are inherently required (unless a default is provided to the select prompt), so I've prevented setting it to false to avoid a more confusing error message. When PHP 8.1 is no longer supported, we can specify true|string directly on the functions.