Issue Description
I created a report mandatory Text input control with a regular expression to restrict usage of empty string.
But when I run the report, it allows applying empty string (null) as the input control value which does not meet our requirements.
How to configure JasperReports Server to apply regular expression even on empty string?
Resolution
When defining text input controls, the default server behavior allows empty strings, even if you've configured a regular expression
and made the input control mandatory.
In order to change the server behaviour, you need to set property to true:
applyRegexpToEmptyString
in /WEB-INF/applicationContext-cascade.xml config file.
The default value of false gives the traditional behavior: even if a regular expression is defined, it is not applied to empty strings.
If you want to strictly enforce the regular expression, even on empty input strings, set this property to true.
Ref. Case 01465816
Recommended Comments
There are no comments to display.