vendredi 1 décembre 2023

Laravel validation regex depends upon dependent answer

We have 2 questions 'temp_id_type' with Select Options 'A','B', 'C' 'temp_id' text field

Validation rule required on temp_id

  • requied_if:temp_id_type,A,B,C Also I need regex rule on temp_id
  • if temp_id_type=A - regex should match: ^[0-9]{13}$
  • if temp_id_type=B - regex should match: ^[0-9]{13,20}$
  • if temp_id_type=C - regex should match: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,35}$


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/jQUbOkE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire