Should I always call Page.IsValid?

前端 未结 3 737
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 21:45

I know to never trust user input, since undesirable input could be compromise the application\'s integrity in some way, be it accidental or intentional; however, is there a

3条回答
  •  不知归路
    2020-12-08 22:19

    You may still want to call it, because in the future their maybe validation controls. I know this kinda falls into adding functionality based on future requirements, but it is also protecting yourself against needing to know if the page is valid and not going through all the event handlers etc. to make sure that it is there if a validator does get added. We have a rule that we always add it, so we don't have that problem of not-validating in the future.

提交回复
热议问题