IMHO data attributes the way to go. I'd use the existing FormField:: setCustomValidationMessage() API to allow users to customise the messaging. Not sure the best way to go about passing those individual values.. Perhaps a custom template for the CommentsForm.