I am trying to validate that only mp4 file is input by user other than mp4 no file input is allowed to user
So this is working fine according to my logic I am spilting value in input file field
after that I am comparing its last string with mp4 if it is fine go for it otherwise block
this work fine if I have name of file like this
a.mp4
myName.mp4
myTution.mp4
but this doesnot work in thse case when there is more than one dot in input file type like this
a.somedata.mp4
1.pilot.mp4
MyWebTutioral.23.mp4
So How can I handle these seneraio?