Validating a tickbox group based on the number of items selected

Hello,

Is there a way to validate a tickbox group in Pro Form based on the number of tickboxes selected: for instance, out of 10 options, the visitor can choose no more than 3 ?

Thanks and best regards,
Philippe