Two former Tesla employees have sued the American electric vehicle company, saying its decision to conduct a “substantial layoff” violated federal law because the company did not notify workers in advance of such a proposal.

In the case they filed Sunday in Texas, two employees said they were fired from their jobs at giant Tesla’s plant in Sparks, Nevada, in June. The case also says the company laid off more than 500 employees at the Nevada plant.

Two employees allege in the lawsuit that the company failed to comply with federal mass layoff laws requiring a 60-day notice period.

The two employees aim to represent all former Tesla employees in the United States who were fired by the company in May or June without notice in the case.

“Tesla only notified employees that their layoffs would take effect immediately,” the lawsuit said.

Tesla has not yet commented on the lawsuit, nor has it commented on the number of layoffs.

Musk, the richest man in the world, said this month that he had a “very bad feeling” about the economy and that Tesla needed to cut its staff by about 10 percent, according to an email obtained by Reuters.

More than 20 people who identified themselves as Tesla employees said they were laid off, laid off from their jobs or laid off this month, according to Reuters and online interviews.

John Lynch, who was fired from Tesla on June 10, and Duxton Hartsfield, whose service ended on June 15, are seeking wages and benefits for a 60-day notice period.

“It’s extremely appalling that Tesla is blatantly violating federal labor law by laying off so many workers without the necessary notice,” Shannon Lees Riordan, an attorney representing the workers, told Reuters. He added that Tesla only offers one-week severance pay to some employees, and added that it is preparing an emergency court filing to try to thwart Tesla’s attempts to lay off employees in exchange for very limited compensation.