Skip to content

Commit 08f9b2d

Browse files
Added indicators to validation
Co-authored-by: mitoskalandiel <mitoskalandiel@gmail.com>
1 parent 26ce3ec commit 08f9b2d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

UIMod/onboard_bundled/assets/js/world-gen-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@ function validateInputs() {
9494
// Validate difficulty
9595
if (!validDifficulties.includes(difficultyInput.value)) {
9696
difficultyInput.classList.add('invalid');
97-
updateInfoText(difficultyInput, `${validDifficulties.join(', ')}`);
97+
updateInfoText(difficultyInput, `${validDifficulties.join(', ')}`);
9898
}
9999

100100
if (worldConfig) {
101101
// Validate start condition
102102
if (!worldConfig.conditions.includes(startConditionInput.value)) {
103103
startConditionInput.classList.add('invalid');
104-
updateInfoText(startConditionInput, `${selectedWorld}: ${worldConfig.conditions.join(', ')}`);
104+
updateInfoText(startConditionInput, `${selectedWorld}: ${worldConfig.conditions.join(', ')}`);
105105
}
106106

107107
// Validate start location
108108
if (!worldConfig.locations.includes(startLocationInput.value)) {
109109
startLocationInput.classList.add('invalid');
110-
updateInfoText(startLocationInput, `${selectedWorld}: ${worldConfig.locations.join(', ')}`);
110+
updateInfoText(startLocationInput, `${selectedWorld}: ${worldConfig.locations.join(', ')}`);
111111
}
112112
}
113113

UIMod/onboard_bundled/ui/config.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,21 +270,21 @@ <h3 class="section-title">{{.UIText_TerrainSettingsHeader}}</h3>
270270
<label for="Difficulty">{{.UIText_Difficulty}}:</label>
271271
<input type="text" id="Difficulty" name="Difficulty"
272272
value="{{.Difficulty}}" pattern="^\S*$" required>
273-
<div class="input-info">{{.UIText_DifficultyInfo}}</div>
273+
<div class="input-info">{{.UIText_DifficultyInfo}}</div>
274274
</div>
275275

276276
<div class="form-group">
277277
<label for="StartCondition">{{.UIText_StartCondition}}:</label>
278278
<input type="text" id="StartCondition" name="StartCondition"
279279
value="{{.StartCondition}}" pattern="^\S*$" required>
280-
<div class="input-info">{{.UIText_StartConditionInfo}}</div>
280+
<div class="input-info">{{.UIText_StartConditionInfo}}</div>
281281
</div>
282282

283283
<div class="form-group">
284284
<label for="StartLocation">{{.UIText_StartLocation}}:</label>
285285
<input type="text" id="StartLocation" name="StartLocation"
286286
value="{{.StartLocation}}" pattern="^\S*$" required>
287-
<div class="input-info">{{.UIText_StartLocationInfo}}</div>
287+
<div class="input-info">{{.UIText_StartLocationInfo}}</div>
288288
</div>
289289
</div>
290290
<div class="fill-hint-wraper" id="fill-hint-wraper" style="display: none; justify-content: center;">

0 commit comments

Comments
 (0)