[EDIT] 金額入力等の入力制限を追加しました。

This commit is contained in:
kkazuya
2026-09-24 15:57:46 +09:00
parent 67906caf90
commit 1e0cc3a953
5 changed files with 27 additions and 10 deletions

View File

@@ -34,7 +34,7 @@
<div>
<label>目標金額</label>
<input type="number" th:field="*{targetAmount}" required min="1">
<input type="number" th:field="*{targetAmount}" min="0" max="1000000000" required>
</div>
<div>

View File

@@ -70,6 +70,7 @@
class="form-control"
th:field="*{saving}"
min="0"
max="1000000000"
required>
</div>
@@ -82,6 +83,7 @@
class="form-control"
th:field="*{annualIncome}"
min="0"
max="100000000"
required>
</div>
@@ -94,6 +96,7 @@
class="form-control"
th:field="*{monthlyBudget}"
min="0"
max="10000000"
required>
</div>

View File

@@ -38,7 +38,8 @@
<input type="date"
id="transactionDate"
class="form-control"
th:value="*{transactionDate}">
th:value="*{transactionDate}"
required>
</div>
@@ -51,7 +52,8 @@
<select id="transactionType"
class="form-select"
th:field="*{transactionType}">
th:field="*{transactionType}"
required>
<option value="">
選択してください
@@ -78,7 +80,8 @@
<select id="categoryId"
class="form-select"
th:field="*{categoryId}">
th:field="*{categoryId}"
required>
<option value="">
選択してください
@@ -105,7 +108,9 @@
class="form-control"
th:field="*{amount}"
min="0"
placeholder="金額を入力してください">
max="100000000"
placeholder="金額を入力してください"
required>
</div>

View File

@@ -44,7 +44,8 @@
id="transactionDate"
class="form-control"
name="transactionDate"
th:value="*{transactionDate}">
th:value="*{transactionDate}"
required>
</div>
<div class="mb-3">
@@ -56,7 +57,8 @@
<select id="transactionType"
class="form-select"
th:field="*{transactionType}">
th:field="*{transactionType}"
required>
<option value="">
選択してください
@@ -83,7 +85,8 @@
<select id="categoryId"
class="form-select"
th:field="*{categoryId}">
th:field="*{categoryId}"
required>
<option value="">
選択してください
@@ -110,7 +113,9 @@
class="form-control"
th:field="*{amount}"
min="0"
placeholder="金額を入力してください">
max="100000000"
placeholder="金額を入力してください"
required>
</div>

View File

@@ -138,6 +138,7 @@
class="form-control"
th:field="*{saving}"
min="0"
max="1000000000"
required>
</div>
@@ -152,6 +153,7 @@
class="form-control"
th:field="*{annualIncome}"
min="0"
max="100000000"
required>
</div>
@@ -166,13 +168,14 @@
class="form-control"
th:field="*{monthlyBudget}"
min="0"
max="10000000"
required>
</div>
<div class="mb-3">
<label for="goalId"
class="form-label">
目標ID
目標貯金額
</label>
<input type="number"
@@ -180,6 +183,7 @@
class="form-control"
th:field="*{goalId}"
min="0"
max="1000000000"
required>
</div>