Updated validation, switch to string() as db field type

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-08-19 19:19:29 +01:00
parent 0823c23a6e
commit 2d6270c697
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -116,9 +116,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'start_date' => 'nullable|date_format:Y-m-d',
'end_date' => 'nullable|date_format:Y-m-d|after_or_equal:start_date',
'autoassign_licenses' => 'boolean',
'address' => 'max:191|nullable',
'city' => 'max:191|nullable',
'state' => 'min:2|max:191|nullable',
'address' => 'nullable|string|max:191',
'city' => 'nullable|string|max:191',
'state' => 'nullable|string|max:191',
'country' => 'min:2|max:191|nullable',
'zip' => 'max:10|nullable',
'vip' => 'boolean',
@@ -14,27 +14,27 @@ return new class extends Migration
Schema::table('settings', function (Blueprint $table) {
if (!Schema::hasColumn('settings', 'ldap_display_name')) {
$table->text('ldap_display_name')->after('ldap_fname_field')->nullable()->default(null);
$table->string('ldap_display_name', 191)->after('ldap_fname_field')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_zip')) {
$table->text('ldap_zip')->after('ldap_manager')->nullable()->default(null);
$table->string('ldap_zip', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_state')) {
$table->text('ldap_state')->after('ldap_manager')->nullable()->default(null);
$table->string('ldap_state', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_city')) {
$table->text('ldap_city')->after('ldap_manager')->nullable()->default(null);
$table->string('ldap_city', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_address')) {
$table->text('ldap_address')->after('ldap_manager')->nullable()->default(null);
$table->string('ldap_address', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_mobile')) {
$table->text('ldap_mobile')->after('ldap_phone_field')->nullable()->default(null);
$table->string('ldap_mobile', 191)->after('ldap_phone_field')->nullable()->default(null);
}
});