Child field set (child table) - any way to limit the number of rows entered?

Does anyone know if it’s possible to limit the number of rows entered in a child table? I’d like to allow the users to enter a maximimum of two rows in a child table - I see the “Validation on Workflow Transition” which allows you to specify a minimum number of rows, but haven’t found any way to validate that the user hasn’t exceeded a maximum.

There are 2 ways you could approach this. If you use the ‘workflow’ validation, then you could write an exit that made the check and prevented the transition if there were too many children.
Another approach would be to create a pre-exit that checked how many children already existed when a new child was submitted and threw an error if a 3rd child was attempted.

Thanks for the suggestions - I was hoping to find something already built in, but if I have time I’ll consider adding an exit.