How to set required POST parameters for routes With GET method we can do something like this

example.user
  path: 'example/{user}'
  defaults: 
    _controller: '\Drupal\example\Controller\ExampleController::content' 
  requirements: 
    _permission: 'access content' 
    user: ^[a-zA-Z0-9_]+


so it sets user param as required and also limits its format.

But I'd like to do something similar with POST method. Tried this, but not working:

example.user
  path: 'example'
  methods:  [POST]
  defaults: 
    _controller: '\Drupal\example\Controller\ExampleController::content' 
  requirements: 
    _permission: 'access content' 
    user: ^[a-zA-Z0-9_]+


EDIT:

Sure I can set some logic inside controller like this, but it doesn't feel right:

public function store(Request $request) {
   $params = json_decode($request-&gt;getContent(), TRUE);
   //I'm trying to avoid using these conditions inside controller methods
   if(empty($params['user'])){
      //return error response
   }else{
     if (!preg_match('/^[a-zA-Z0-9_]+/', $params['user'])) {
       //return error response
     }
   }
  //return success response
}


So what's drupal way to do it?
I did something like this before ( take a look at helper link ),it  not required to tell router about type

just post your data and in your controller  get them with 

$value = \Drupal::request()-&gt;request-&gt;get('your_posted_variable'); 


Also you can get all $_POST variables with 

  \Drupal::request()-&gt;request-&gt;all(); // equal to $_POST