code: public function validate( $request ) {
  
  		if ( ! empty( $request[ 'send_by_bcc' ] ) && '1' === $request[ 'send_by_bcc' ] )
  			$request[ 'send_by_bcc' ] = '1';
  		else
  			$request[ 'send_by_bcc' ] = '0';
  
  		if ( ! empty( $request[ 'send_attachments' ] ) && '1' === $request[ 'send_attachments' ] )
  			$request[ 'send_attachments' ] = '1';
  		else
  			$request[ 'send_attachments' ] = '0';
  
  		return $request;
  	}
docs: validate the input
  
  @param array $request
  @return array