Validator with Edge Component

Hi guys,

Could someone please assist with a pair of fresh eyes on this issue, I am using edge components to build my forms but when a field does meet the requirements set for the validator and returns, the other fields have been cleared.

Here is my code:

Route'Components/Create', 'CreateComponentController.processComponentCreation').validator('CreatePageComponentValidator')

Input Field Component (Sorry I have some HTML markup in there as well)

<div class="form-group col-md-{{ input_col_size }} mb-{{ input_margin_bottom }}">
    <label for="{{ related_to }}">{{ input_label_text }}</label>

    type="{{ input_type ? input_type : 'text'}}"
    id="{{ input_name }}"
    name="{{ input_name }}"
      value="{{ input_value ? input_value : old( input_name, '') }}"
      placeholder="{{ input_placeholder }}"
    {{ required ? 'required' : null }}
    {{ disabled ? 'disabled' : null }}
      placeholder="{{ input_placeholder }}"

Component Definition within my edge files

@!component('components.input', {
  input_col_size: 12,
  input_margin_bottom: 4,
  type: 'text',
  input_name: 'component_name',
  input_placeholder: 'Provide a Memorable Component Name',
  related_to: 'component_name',
  input_label_text: 'Component Name *',
  input_value: '',
  required: false,
<div class="error-info">
    <img src="{{ assetsUrl('admin/assets/img/icon-info.svg') }}" class="icon" alt="">
    {{ getErrorFor('component_name') }}

Any assistance will be appreciated.



@McSneaky @virk Can you please provide any insights on this?

Thanks in advance


Sorry for long delay, to be hones I haven’t ever used this feature, so I don’t know exact answer

But are you setting old value in session?

You need to set it to flash store first