All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
In principle, job's contract is a leasing contract whereas the latter is binding for both parties in which none is permitted to annul it save at the end of the agreed upon period. Therefore, there is no harm if one of the parties stipulated a penalty clause in case of contract's annulment with no sound excuse. Especially, if there was a harm or damage inflicted on the employer by this; thus, stipulating financial fee as mentioned in the penalty clause is of great importance to the employer as a compensation of the aforementioned damage.
Furthermore, the aforementioned clause is permissible within job's contract, since whosoever signed a contract and agreed on its terms and conditions is obliged to abide by so long as no Sharia violation exists, for Allah, The Exalted, said (What means): "O ye who believe! fulfil (all) obligations." [Al-Ma'idah/1] in addition, the Prophet (PBUH) said (What means):" Muslims must abide to their conditions." [Related by Al-Hakim and others].
Stating the penalty clause within job's contract is permissible as clarified in resolution (109/3/12) by the international Islamic Fiqh Academy as follows:" Stipulating the penalty clause in all financial contracts is permissible."
Therefore, the employer should abide by the penalties or fines given by the employee save if he was exempted from, as well we (Iftaa' Dept.) recommend job seekers to take their time while concluding contracts; especially, the ones that involve a penalty clause so the employer won't look for excuses in the future to avoid such a commitment or to be exempted from it.
In conclusion, we advise employees to be lenient and merciful with the employers and to abstain from exploiting their dire need for a job to impose penalties and fines on them; especially if they were violating the labour law which exists to maintain the interests of the employees and to ward off any possible corruption. And Allah knows best.