Public demo: nothing is sent to any provider and the data resets regularly.

Validation playground

One form, five packages. Every field is optional except the identifier kind and the captcha, so you can try one rule at a time. Rules run through the framework's #[validate(..)] attributes; failures come back as ordinary field errors.

laravel-iban laravel-vat laravel-national-ids laravel-captcha laravel-purifier

Bank account

VAT number

The VIES check is disabled on the public demo: the check digit is verified offline and nothing leaves the server.

National identifier

Synthetic examples: TR TCKN 10000000146, BR CPF 111.444.777-35, ES DNI 12345678Z.

HTML to sanitize

Captcha

Cloudflare Turnstile with Cloudflare's documented test keys: the widget always passes. On the public demo the token is not sent to Cloudflare's siteverify; the server only checks that the widget produced one.

Results

Submit the form to see the formatted values and the sanitized HTML.

The input struct

#[laravel::input]
pub struct Playground {
    #[validate(Iban::new())]                iban: Option<String>,
    #[validate(Bic)]                        bic: Option<String>,
    #[validate(VatNumberRule::checksum())]  vat_number: Option<String>,
    #[validate(required, NationalIdKind)]   id_kind: String,
    #[validate(NationalIdOfKind)]           national_id: Option<String>,
    #[serde(rename = "cf-turnstile-response")]
    #[validate(Captcha::new())]             captcha: Option<String>,
}
// VatNumberRule::online() is added in ValidatesRequest::rules when "vies" is ticked.

Image captcha

laravel-captcha 0.3 also draws its own captcha, the counterpart of mews/captcha: nothing leaves the server and no account is needed. The answer lives in the session as a salted digest, expires after a minute and can be tried once, so a wrong answer needs a new image.

Özkan Özcan

Available for new projects

Hire the developer behind these packages

I am Özkan Özcan. I ported, tested and published every package in this demo, and I can do the same for your code:

  • Port your Laravel package or application to Laravel Rust
  • Move one slow service first and keep the rest in PHP
  • Priority support and custom features for any OzSuite package
Start a project See my services

I reply within one working day.