HTML select list validation

I'm working on a web app project (in java; not that it matters) and we have a form with drop down lists and input fields. Obviously drop down lists are provided because we expect a specific value from a set of values. So my question is this: does it make sense to ensure the submitted value is in the set of expected values? Or is it acceptable to just assume the correct value is coming across? There aren't any "errors" that would arise from different values being submitted, but the data store would not be consistent with the business rules/requirements.
How would a user submit a value that isn't in the list of choices? Are you trying to catch people copying the code from View Source, altering it, and submitting that? And, doesn't the data store have a foreign key constraint to a table containing the acceptable values?

以上就是HTML select list validation的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准