[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> <div>
<label>目標金額</label> <label>目標金額</label>
<input type="number" th:field="*{targetAmount}" required min="1"> <input type="number" th:field="*{targetAmount}" min="0" max="1000000000" required>
</div> </div>
<div> <div>

View File

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

View File

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

View File

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

View File

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