Why might form values not be passed from input to values? Somewhere between buildForm and validateForm the $form_state's 'input' becomes the 'values'.  The values are listed as 'null'.  For some reason, some sort of validation from core seems to be preventing only SOME of my values to be left behind, and there's no reason I can come up with, because the data is identical.  Both are textfields representing URLs.  My form is kind of complicated, so I can't post it unfortunately.

I have a feeling the problem is involving ajax somehow.  The fields which are failing are fields which are added to the form by ajax.  Sometimes the values turn to null, and other times the values turn to an empty string.

Where should I look in core to figure out what validation might be getting mad at my fields?  Do you know of any typical thing that might prevent a user's input from passing to values?

EDIT: Here are the contents of my buildForm:

$items['redirect']['old'] = [
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('Old'),
  '#default_value' =&gt; '',
  '#size' =&gt; 40,
  '#maxlength' =&gt; 502,
  '#description' =&gt; t('Old URL.'),
  '#required' =&gt; TRUE,
];

$items['redirect']['new'] = [
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('New'),
  '#default_value' =&gt; '',
  '#size' =&gt; 40,
  '#maxlength' =&gt; 502,
  '#description' =&gt; t('Redirect URL.'),
  '#required' =&gt; TRUE,
];

$defs = $this-&gt;grabDefaultValues();

FormHelper::elementClone($form, $form_state, $items['redirect'], ['old'=&gt;$defs['olds'],'new'=&gt;$defs['news']]);

$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; 'Submit',
);

return $form;


The FormHelper part is just some reusable code for cloning the two elements together, so I get old1, old2, old3, etc.  old1 always works, but old2 and old3 mess up sometimes.  The thing is, I have used this code before, and it worked, so I don't know what's happening in this case.
Apparently, around line 1162 of FormBuilder.php, Drupal checks to see if there is a #name element to the field element you're using.  If there's not, it uses the parent's name, which seems to be the previous form element's name.

The clone function wasn't setting unique #name's.  I could have sworn it worked before, but maybe not.