Commit 25a84bd4 by Clinton Blackburn

Displaying price validation errors

Added the necessary DOM elements and an internationalized error message.

ECOM-2075
parent a5fdbf19
...@@ -15,7 +15,8 @@ define([ ...@@ -15,7 +15,8 @@ define([
validation: { validation: {
price: { price: {
required: true required: true,
msg: gettext('All course seats must have a price.')
}, },
product_class: { product_class: {
oneOf: ['Seat'] oneOf: ['Seat']
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
<input type="number" class="form-control" name="price" id="price" min="5" step="1" pattern="\d+" <input type="number" class="form-control" name="price" id="price" min="5" step="1" pattern="\d+"
value="<%= price %>"> value="<%= price %>">
</div> </div>
<!-- NOTE: This help-block is here for validation messages. -->
<span class="help-block"></span>
</div> </div>
</div> </div>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<input type="number" class="form-control" name="price" id="price" min="5" step="1" pattern="\d+" <input type="number" class="form-control" name="price" id="price" min="5" step="1" pattern="\d+"
value="<%= price %>"> value="<%= price %>">
</div> </div>
<!-- NOTE: This help-block is here for validation messages. -->
<span class="help-block"></span>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment