Laravel Packages

Squeaky

Published
Squeaky image

Created by Jon Purvis, Squeaky is powered by Profanify, which we recently covered. Based on user feedback, he has extracted a standalone validation rule, making Squeaky a powerful tool right from the start. It also supports multiple locales, not just English.

Install this package using Composer:

composer require jonpurvis/squeaky

Example

namespace App\Http\Controllers
 
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use JonPurvis\Squeaky\Rules\Clean;
 
class EventController extends Controller
{
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255', new Clean],
'description' => ['required', 'string', new Clean],
'event_date' => 'required|date'
]);
 
// ...
 
return redirect('/events');
}
}

If your application supports multiple languages, you can pass additional locales to the rule to accommodate them.

use JonPurvis\Squeaky\Rules\Clean;
 
'name' => ['required', 'string', 'max:255', new Clean(['en', 'pt_BR'])],

Learn more about this package and view the source code on GitHub.

Yannick Lyn Fatt photo

Staff Writer at Laravel News and Full stack web developer.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Laravel Auditor Audits Your App With Your Own AI Agent image

Laravel Auditor Audits Your App With Your Own AI Agent

Read article
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article