Form validation

后端 未结 4 1802
灰色年华
灰色年华 2021-01-16 23:46

I need to create a form that has many of the same fields, that have to be inserted into a database, but the problem I have is that if a user only fills in one or two of the

4条回答
  •  隐瞒了意图╮
    2021-01-17 00:09

    As others have said, it's bad practise to rely on javascript as your only form of validation. Look to javascript as a way to help your users submit valid data - but you should always validate on the server side. With that in mind, here's my suggestion:

    Name: E-mail:
    Name: E-mail:
    Name: E-mail:
    Name: E-mail:

提交回复
热议问题