moment date format check [duplicate]

I have a array of object given below:

[{
    "value": "10/12/2022",
    "is_date_musk": true
},
{
    "value": "1/10/2020",
    "is_date_musk": false
},
{
"value": "1/10/2020",
    "is_date_musk": false
},
{
    "value": "1/10/2020",
    "is_date_musk": false
}]

using moment I am checking if the value is a valid date.
If I use format “MM/DD/YYYY” it return true. But if I give format “MM/DD/YYY” it also return true.
Any solution how to give error using moment if complete date is not matching the given format.

With the above code I have tried to check date 10/12/2022 with format mm/DD/YYY it gives true.