In order to make the validation of the select when you submit an entire form,
you can ask to the select to validate the field.
If a value was required and the user did not change it and submitted the form,
we will check that the select field is not valid and stop the form submit.

```html
<osds-select id="myOdsSelect" required>
  <span slot="placeholder">Select Country</span>
  <osds-select-option value="1">Value 1</osds-select-option>
  <osds-select-option value="2">Value 2</osds-select-option>
  <osds-select-option value="3">Value 3</osds-select-option>
</osds-select>
<button onclick="submitMyForm()">Submit</button>
```

```typescript
// vanilla typescript
const odsSelect = document.querySelector('osds-select#myOdsSelect');
(window as any).submitMyForm = function () {
  console.log('submitMyForm');
  odsSelect?.validate()
    .then(validity => {
      console.log('myOdsSelect validity', validity);
      if (validity.valid) {
        console.log('ok can submit my form');
      } else {
        console.log('cannot submit my form. select is not valid');
      }
    });
};
```
