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
but this doesnot work in thse case when there is more than one dot in input file type like this
So How can I handle these seneraio?