I have a Webform with a custom composite, and there I have a element which type is Number and i want to validate this element.

If I check required when the field is empty it show a message that the field is required, but if I put letters in the field show the same message when it should be that the field is not valid because it has letters.

I know how to do this with a textfield element but this element is not inside the custom composite with a regular expression . And even if i change the custom composite element from Number to Textfield I can not do it this, can not be validated individually.

2 Answers 2


You can add regular expressions for elements in a custom composite by going to the General tab of the custom composite, then adding your regular expression in the custom properties field for an element within the Custom composite settings section.

This link may be of use:



Instead of putting validations just create a number type field. And inside the number field of the custom composite element, you can not enter the letters, only numbers can be entered so no concept/need for validating against letters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.