fomantic / Fomantic-UI

Fomantic-UI is the official community fork of Semantic-UI
https://fomantic-ui.com
MIT License
3.52k stars 329 forks source link

[dropdown] inline validation on submit #3045

Closed mdrxy closed 2 months ago

mdrxy commented 2 months ago

Feature Request

Currently, if inline validation is set to true, it is not possible to override the validation's on trigger, which is set to blur. I'd appreciate the option to specify a different setting such as on: 'submit'.

lubber-de commented 2 months ago

Mmh, i think this is already working

$('.ui.form')
  .form({
    fields: {
        "pet": "empty" 
    },
    inline : true,
    on     : 'submit'
  })
;

See https://jsfiddle.net/lubber/sx1y9tab/8/ It validates only on submit and shows the errors inline.

Please adjust the jsfiddle according to your use case.

[Edit] Added a Dropdown which you were mentioning. But it still works as expected and requested.