How to access form elements in table via getValue()?
You can access $form_state values like below

$values = $form_state-&gt;getValues();

If you are printing $values then you will get 

Array
(
    [mytable] =&gt; Array
        (
            [1] =&gt; Array
                (
                    [a] =&gt; Value of a
                    [b] =&gt; Value of b
                )

        )
)


setErrorByName() function can be used while validating the elements.