How to force regex to validate selected

前端 未结 1 1918
囚心锁ツ
囚心锁ツ 2021-01-25 08:53

I have a registration form, in this form I force the users to select a country:

HTML

    
1条回答
  •  星月不相逢
    2021-01-25 09:25

    Check if option.value !== "----", that should be enough. You definitely don't need Regex for this.

    0 讨论(0)
提交回复
热议问题