How to write a validatoin extension?

I’m trying to provide a length validation across multiples fields so that the total length of all the fields I choose does not exceed a certain amount. I’ve been advised that this can be done by writing an extension.
Does anyone have some simple java extension code and a quick how-to that could help get me started?
Much appreciated.

You can write a preprocessor extension for it. It will get executed when you click the INSERT/ UPDATE button on the content editor form.

Is there an example “preprocessor” extension that we can use as a starting point?

That would be a useful starting point for me if someone is willing to share some very basic code.

It isn’t necessarily basic, but have a look at

What you want is the src zip. It isn’t a validation extension per se, but you should be able to adapt it / get a feel for what needs to happen from there.

The source to many of our extensions is included in [rxroot]/Exits. See com.percussion.extensions.general.PSCopyParameter as an example similar to what you are looking to do. Use the IPSItemValidator interface rather than IPSItemInputTransformer.