If the oral agreement was an undertaking on the part of the plaintiff to work for two years, it was within the statute and void. The plaintiff was under no obligation to continue in his employer’s service for that length of time, but was at liberty to leave at any time, and could recover for the value of the service he had rendered. If it was not such an agreement, then it is to be taken as an agreement between the parties fixing the rate of compensation. It was So treated by the justice, and the amount that remained unpaid of the wages thus agreed upon, the plaintiff *619would be entitled to recover. Upon this evidence the defendant could ask no deduction from the plaintiff’s wages, and the justice was right in not allowing it.
Judgment affirmed.