https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40948
--- Comment #2 from Brendan Lawlor <[email protected]> --- Attaching this patch for feedback. It replaces the js alert with html form validation using the pattern attribute and a regular expression. It sets the input as required so you cannot submit an empty value. The pattern matches numeric values with up to two decimal places. Allows: 0 - zero 100 - integers 0.5 - leading 0 before a demical place .5 - single decimal place 20.75 - two decimal places Rejects: 001 - leading zeros before integer 10. - no digits after decimal 5.255 - three decimal places I also thought about making this a number type input with step=".01" Custom validation with Bootstrap might be nice too, but this was the simplest solution. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
