Be careful!
There is the regulation, the recommendations by the electrical distributors and questions the ministry. All levels of regulation must be applied.
Whether it is checked in 2 years or 20 years, the electrician who did the installation is responsible in Spain unless able to prove that it was modified since.
Places with public access are especially complicated.
LEgrad offers a guide international which explains some superficial basics in a pdf file: just search guide international on google.
Now it seems inspectors in Spain can be either very strict or lax on a lazy day.