Form validation - Required one of many in a group

后端 未结 8 1227
时光取名叫无心
时光取名叫无心 2020-12-05 18:31

In the project I\'m working on at the moment I currently have three textboxes and I need to validate that at least one of the text boxes has been populated.

I\'ve be

8条回答
  •  清歌不尽
    2020-12-05 19:17

    It's too late but might be can save some one's time:

    If there are only two fields, and want to make one of them required then

    
    

    If you have three like in question then

    
    

    If more than this, I will suggest to write a function on scope and watch it.

    See the working example

提交回复
热议问题