Validation Before submit In List view and Form

Hello
In the attendance request doctype
To restrict the user from submitting backdated entries even from the ListView, how to restrict trough entering code in the Server script doctype.

I have put the custom script also but Script doesn’t work on List view Selection you can see on my screenshot



regards
Harshal Nirmal