I am attempting to limit the number of characters for specific fields on a Carousel component but cannot seem to find an example where a form of validation is applied to limit input to specific fields. Any help on how to implement this would be greatly appreciated.
Sample of our current implementation for reference:
@ParametersInfo(
type = DynamicComponentInfo.class
)
public class BaseClientComponent extends BaseHstDynamicComponent {
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) {
super.doBeforeRender(request, response);
DynamicComponentInfo componentParametersInfo = (DynamicComponentInfo)this.getComponentParametersInfo(request);
Iterator var3 = componentParametersInfo.getDynamicComponentParameters().iterator();
while(var3.hasNext()) {
DynamicParameter param = (DynamicParameter)var3.next();
DynamicParameterConfig componentParameterConfig = param.getComponentParameterConfig();
if (! (componentParameterConfig instanceof JcrPathParameterConfig)) {
Object value = componentParametersInfo.getResidualParameterValues().get(param.getName());
request.setAttribute(param.getName(), value);
}
}
request.setAttribute("baseparams", componentParametersInfo);
request.setAttribute("componentUUID", UUID.randomUUID());
}
}