How to limit the vertical rotation of the camera

If you are using add relative rotation to spring arm to do it then this what I did.

after add rotation check what is current pitch, if out of bounds on either side then SET relative rotation to the limit it passed. It worked well for me but I also had to clamp how fast they could rotate by clamp the input in add relative rotation.