Set the required_error property "required_error" to form elementas in the following code. This is available in Drupal 8.6. For ex-
$form['name'] = [
'#type' => 'textfield',
'#size' => 60,
'#default_value' => $form_state->getValue('name', ''),
'#required' => TRUE,
'#required_error' => t('Please select something.'),
];
To make this work, firstly you will have to disable HTML 5HTML5 validation on the form.
$form['#attributes']['novalidate'] = 'novalidate';