London (CNN) A woman who wanted to break the Guinness World Record for running a marathon dressed as a nurse has been told her successful attempt does not count -- because she was wearing scrubs and pants, rather than a skirt.

Jessica Anderson, a nurse at the Royal London Hospital, ran the city's marathon last Sunday in the outfit she wears at work.

But she was told beforehand by Guinness World Records that she would need to wear a blue and white dress, apron and a traditional nurse's cap for her effort to be valid, Britain's Press Association reported.

Full-body scrubs are too close to the organization's definition of a doctor's costume, officials added.

"Their definition is just so outdated," Anderson told the magazine Runner's World. "Some of the nurses I work with do wear dresses but mostly we wear scrubs or a tunic and trousers. I've certainly never seen a male nurse wearing a dress to work."

Read More