Indonesia's army chief has come out in defence of the much criticised mandatory 'virginity test' for female cadets, claiming that the test ensures that only morally upright women get to join the army.

"So what's the problem? It's a good thing, so why criticise it?" army chief General Moeldoko asked reporters on Friday.

The Indonesian army has long maintained the practice keeps 'immoral women' away from joining the armed forces.

The Jakarta Globe report noted that the army chief was responding to a question by the journalists on the growing international condemnation of the two-finger test, which all women must pass to join the Indonesian military.

While he accepted that being a virgin has no link to the abilities of a woman, the army chief emphasised that it was a must for understanding the moral uprightness of a female cadet.

He said virginity is one of the three important traits all Indonesian women wanting to join the armed forces must possess. High academic aptitude and physical strength are the other two parameters.

The remark by the army chief came a day after a human rights group urged Indonesia to abolish invasive "virginity tests" for female recruits and the fiancées of military officers in its armed forces, Reuters reported.

Human Rights Watch in its statement noted that President Joko Widodo should ask military hospitals to immediately stop the degrading and cruel practice, which violates international human rights treaties.

"The Indonesian armed forces should recognise that harmful and humiliating 'virginity tests' on women recruits do nothing to strengthen national security," said Nisha Varia, HRW's women's rights advocacy director.

Amid the growing criticism earlier last week, Indonesian military spokesman Major-General Fuad Basya​ bluntly told the Sydney Morning Herald that the 'virginity test' was undertaken to ensure "[we] get the best people both physically and mentally."

He too previously had stated that the tests were to keep immoral women from joining the army.