Hi,
would someone be kind enough to share some validation examples using the servoy.GlobalMethodValidator? I could not find examples in the 3.5 documentation or in the forum.
Is a separate global method needed for every field that has to be validated? What is the advantage over e.g. a onDataChange method?
Furthermore, how should error handling be done? I would like to display custom error messages to the user (also when using the regex, email, etc. validator)?
Thanks Jan,
this is really a great presentation/sample solution! I already tried to check it out once before, but I seem to have messed up, when I downloaded the file in Sean Devlin’s post and couldn’t import the solution Now it works fine and I got a lot of great input.
Right now it leaves one big question for me (I’m sure others will come, when I try to work some of the stuff into my solution). Is it possible to make error messges on column validation more user friendly? If not, I will probably have to stick with record and transaction validation…
With Servoy’s errorhandler you can create custom messages. To get started:
create a global method name it eg errhndlr attach that to the on error method of your solution properties
in that method click move sample on isServoyException of the ServoyException object
in the output window or by using breakpoints you can now see what messages/codes are coming in and you can use those to write your own error dialogs or logging.