The nails must be cut before forty days have passed, because the Messenger (peace and blessings of Allaah be upon him) set that time limit for cutting the nails, shaving the pubic hair, plucking the armpit hair and trimming the mustache.

These things should not be left for more than forty days, as was proven from the Prophet (peace and blessings of Allaah be upon him) in Saheeh Muslim, 258.

So men and women alike must take care of this matter and not leave the nails, moustache, pubic hair or armpit hair for more than forty days.

Wudoo is valid and is not invalidated by whatever dirt may be under the fingernails, because it is a small amount and is excused but it is highly recommended to keep them clean.