Static preview. Server-backed interactions are available only in a local checkout.

Form Validation Demo

Use the ValidCarve rule in Form Requests to validate Carve markup.

Article Form

This form works only in a local checkout. Clone the repository and run composer install && php artisan serve.

Supports Carve markup Uses strict validation and the user_content profile

Code

Form Request

use MarkupCarve\LaravelCarve\Rules\ValidCarve;

class ArticleRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'title' => ['required', 'string', 'max:255'],
            'body' => ['required', 'string', new ValidCarve()],
            'comment' => ['nullable', 'string', new ValidCarve(strict: true)],
        ];
    }
}

Blade Render


@carve($article->body)


{!! Carve::toHtml($comment, 'user_content') !!}