rafal
1
Hello,
I’m having trouble to find examples of data validation in Bitbucket forms.
I’m developing a plugin and it has options page. I created a servlet and soy template to it. Now I need validation mechanism.
Are there any elegant way to do validation using SDK or should I implement my own mechanism from nothing?
huw
2
Hi @rafal,
Can you elaborate on what part of Bitbucket Server you’re developing for?
If you’re making a Repository Merge Check, that page suggests you might be able to use a <validator/>
tag in your <repository-merge-check/>
rafal
3
Hello,
It’s not Repository Merge Check. It’s a plugin which do stuff based on onMerge event, but it’s not Repository Merge Check workflow.
I added options to this plugin and don’t know how to validate it. I don’t want to reinvent the wheel if there’s dedicated solution in SDK.
rafal
4
My experience with searching info about it tells me either is some ultra secret knowledge for chosen ones or there’s no solution in SDK.
Any confirmation?
Implement the SettingsValidator interface and tie that to your <repository-merge-check/>
definition.
rafal
6
Will it work even when I’m not implementing plugin that not validates merge but does something else?