mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-11 12:09:26 +00:00
feat(validation): centralize validation patterns for names and descriptions
- Introduced `ValidationPatterns` class to standardize validation rules and messages for name and description fields across the application. - Updated various components and models to utilize the new validation patterns, ensuring consistent sanitization and validation logic. - Replaced the `HasSafeNameAttribute` trait with `HasSafeStringAttribute` to enhance attribute handling and maintain consistency in name sanitization. - Enhanced the `CleanupNames` command to align with the new validation rules, allowing for a broader range of valid characters in names.
This commit is contained in:
1 parent
0bb9ee4327
commit
38c0641734
30 files changed
+238
-132
No files matched your search
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\HasSafeNameAttribute;
|
||||
use App\Traits\HasSafeStringAttribute;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
class ScheduledTask extends BaseModel
|
||||
{
|
||||
use HasSafeNameAttribute;
|
||||
use HasSafeStringAttribute;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user