When the employment contract provisions differ from laws in South Africa, the law takes precedence, unless your employment contract contains clauses that are more favorable to you than the law.
In this scenario, your employment contract states 25 days of annual leave per year, but the labour laws require a minimum of 30 days. The law takes precedence, so you are legally entitled to the full 30 days of annual leave, despite what your contract says.
However, if the law states that the minimum annual leave entitlement for employees is 15 days per year and your employment contract entitles you to 20 days, then your employment contract takes precedence over the law because it provides more favorable terms.