Browse Source

Correct price formatting in add & edit web forms

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.1-alpha
Pekka Helenius 4 years ago
parent
commit
0c6ad7b26c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java

+ 3
- 0
bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java View File

@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull;
import com.fjordtek.bookstore.validation.CurrentYear;
import org.springframework.format.annotation.NumberFormat;
//import java.sql.Timestamp;
//import javax.validation.constraints.PastOrPresent;
@ -112,6 +114,7 @@ public class Book {
)
private String isbn;
@NumberFormat(pattern = "#,###,###,###.##")
@Digits(
integer = 3, fraction = 2,
message = "Invalid price, possibly too many decimals"


Loading…
Cancel
Save