Gaurav Sharma wrote:then jquery [sic] error message should get displayed beneath StartTime field.
Again, there's no such thing as "jquery [sic] error message". If you want to show the message after the field, then you would use jQuery to create the HTML elements needed to show the text.
I am able to show error message for single field but don't know how to achieve it when I am comparing two fields.
I don't see the problem. You already know where you want to put the text. Just put it there. How does the fact that the condition compared two fields affect that?
By the way, I'd suggest using the
jQuery Validation Plugin rather than rolling your own. It can automate much of this.