Is there a way to validate if the String passed as time is valid using Moment JS?
The operations moment("2014-12-13 asdasd","YYYY-MM-DD LT").isValid()
or moment("asdasd","LT").isValid()
equate to true
which ideally shouldn't happen.
My application uses multiple languages and it is really not possible for me to come up with a RegEx pattern to validate the string. For example, if I get the time string as "午前12時12分0秒"
, Moment JS should be able to validate this. I checked the source and found that time checking is not that strict in the library. I might have missed something. Please help.