Webform Custom element option values validate Can anyone please suggest how to validate the custom element option values ( select). This validate should work, once we add new element to the form and fill the option value and then click save / save and add element.
due to explaining in comment i am thinking you are making a custom
Plugin\WebformElement;
aka
namespace Drupal\YOURMODULE\Plugin\WebformElement;
use Drupal\webform\Plugin\WebformElementBase;
...
if this is the case look at this example
( '#element_validate' =&gt; [[get_class($this), 'validateOptions']] )
 public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['general']['mycustom'] = [
      '#type' =&gt; 'fieldset',
      '#title' =&gt; $this-&gt;t('mycustom Settings'),
  ];


  $form['general']['mycustom']['some_question_text'] = [
    '#type' =&gt; 'textfield',
    '#title' =&gt; $this-&gt;t('Some Question title '),
    '#required' =&gt; TRUE,
    '#default_value' =&gt; $this-&gt;getDefaultProperty('hello'),
    '#element_validate' =&gt; [[get_class($this), 'validateOptions']], //HERE &lt;----
  ];

........
later on in the same class ...
.......
 /**
  * Example validate 
  */
 public static function validateOptions(array &amp;$element, FormStateInterface $form_state) {
   $name = $element['#name'];
   // EG ... $options = $element['#options']
   $form_state-&gt;setErrorByName($name, t('@m', ['@m' =&gt; 'HELLO']));
 }