This commit is contained in:
Keith Donald
2008-05-13 15:34:19 +00:00
parent 5adf8a0cc8
commit aace42fb8f
2 changed files with 7 additions and 6 deletions

View File

@@ -178,11 +178,11 @@ public class Booking implements Serializable {
public void validateEnterBookingDetails(MessageContext context) {
if (checkinDate.before(today())) {
context.addMessage(new MessageBuilder().error().source("checkinDate").code("checkinDate.beforeToday")
.build());
context.addMessage(new MessageBuilder().error().source("checkinDate").code(
"booking.checkinDate.beforeToday").build());
} else if (checkoutDate.before(checkinDate)) {
context.addMessage(new MessageBuilder().error().source("checkoutDate").code(
"checkoutDate.beforeCheckinDate").build());
"booking.checkoutDate.beforeCheckinDate").build());
}
}

View File

@@ -1,4 +1,5 @@
checkinDate.beforeToday=The Check In Date must be a future date
checkoutDate.beforeCheckinDate=The Check Out date must be later than the Check In Date
booking.checkinDate.typeMismatch=The Check In Date must be in the format dd/mm/yy
booking.checkoutDate.typeMismatch=The Check Out Date must be in the format dd/mm/yy
booking.checkinDate.beforeToday=The Check In Date must be a future date
booking.checkoutDate.typeMismatch=The Check Out Date must be in the format dd/mm/yy
booking.checkoutDate.beforeCheckinDate=The Check Out date must be later than the Check In Date