lundi 7 novembre 2016

I want to validate some text input in laravel

I am developing online shopping website.In text field I need a validation like:

  1. if character and special character comes serially it should have space between them.
  2. if special character and number comes serially then it should not have any space and after special character number should come serially.
  3. if number and string comes serially then it should not contain any space.

Example:

  • ASIDOL-50mg Capsule --correct
  • ASIDOL- 50mg Capsule --incorrect
  • ASIDOL-50 mg Capsule --incorrect
  • ASIDO-50mg Capsule --incorrect
  • ASIDO-50 mg Capsule --incorrect

I am using laravel 5.2

Aucun commentaire:

Enregistrer un commentaire