for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Milwad\LaravelValidate\Rules;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Str;
class ValidKebabCase implements Rule
{
/**
* Check value is kebab case.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
return Str::kebab($value) === $value; // TODO: Better
}
* Get the validation error message.
* @return string
public function message()
return __('validate.kebab-case');