Verizon Communications Inc. defeated a lawsuit by two former employees who said the company misled them about their severance benefits.

Nicholas Brandt and Gregory James signed release agreements that block their current lawsuit, which accuses Verizon of inducing them to remain with the company by misrepresenting how big their severance payments could be, a federal judge ruled May 15.

Brandt and James said their release agreements were invalid under a California law prohibiting contracts that limit a party’s liability for current or future fraud. But the allegedly fraudulent conduct identified by Brandt and James occurred in 2014, when Verizon acquired...