How to restrain a field/object in a box?

Hello,
I’d like to add a rule to my series of curves (made with field) which is to restrain them inside a box. I don’t want to cut them, i would like them to remain inside a volume.

field component 4.3dm (91.8 KB)
field component 4.gh (15.9 KB)

If someone have any idea,
Thank you