3.15.19
Introducing the Regex validation rule for structured output:
namespace App\Neuron\Output;
use NeuronAI\StructuredOutput\Validation\Rules\Regex;
class Coupon
{
#[Regex('/^[A-Z]{2}\d{4}$/')]
public string $code;
}Check it out in the documentation: https://docs.neuron-ai.dev/agent/structured-output#regex