http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=906 --- Comment #10 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #9)
(In reply to comment #8)
(In reply to comment #7)
I don't think a check like this can be done with a value_builder plugin. If I am wrong, a value_builder plugin would definitely be better, but the plugins aren't -- so far as I understand -- used for validation but rather as helpers for setting fields.
You can put a hook on entering or leaving a field. If you put a hook on leaving ISBN field, then it will be a validation. We use that for some plugins already. The ... on the right are not necessary used to open a popup, then can be used to do a check as well.
How would the workflow be in case of bad ISBN Paul? Can't save unless put in the $z field? Do u still suggest validating it on the perl side or the onLeave thing should use the same javascript code?
I would say "can't save an invalid ISBN". So, if the subfield is empty, then it's OK. That could be cool to move it to $z automatically ($z is also the invalid isbn for UNIMARC ;-) ), but could also be discussed, as it may trouble users. I suggest validating on the onLeave, so at browser side, as your current patch do. (javascript is required to run staff interface, I'm fine with that) -- You are receiving this mail because: You are watching all bug changes.