Welcome to FlyerTalk.
The Ryanair website refer to six months' validity in order to use their online verification system. Otherwise your partner may* need to have their passport at the Ryanair visa check desk at the airport- allow extra time.
Spain is part of Schengen and follows the Schengen rules. For non-EU nationals, the passport must have a minimum of
three months validity on the date of departure. Therefore her passport
should be accepted for travel by Ryanair. Source:
https://europa.eu/youreurope/citizen...s/index_en.htm
Ukrainian citizens do not require a visa to enter the Schengen area.
(*The Ryanair website really is terribly worded; it refers to 'non-EU/EEA nationals', but presumably UK nationals don't need a visa check?)