No, it is not legal. An employer may not dock pay for money owed the employer unless the employee agrees to let the employer do that. (More generally: an employer may never deduct from a paycheck for any reason except when the employee consents to the deduction, or when required by law, like court-ordered wage garnishment.) If the employer docks pay without consent, you could file a complaint with the state department of labor, and/or sue (such as in small claims court) for the money.