'', 'email' => '', 'password' => '', 'plan' => 'free']; public bool $sent = false; // The same rules as the Livewire form. With `as: 'form'` the browser checks each field as // it changes; the server checks them all again when the form is sent. #[Server] public static function register( #[Validate([ 'name' => 'required|min:2|max:50', 'email' => 'required|email', 'password' => 'required|min:8', 'plan' => 'required|in:free,team,business', ], as: 'form')] array $form, ): \Unscripted\Ui\ServerCall { return new \Unscripted\Ui\ServerCall('compare-signup', 'register', func_get_args()); } public function save(): Generator { if (!$this->validate()) { return; } yield static::register($this->form); $this->sent = true; } }; ?>
Signed up as {{ $form['email'] }}.
@else @endif