Topic: form-validation for a large number of field with the same content-type but different names.

a_luedke free asked 4 years ago


Hi, i have to validate a large number of fields (up to forty) in several forms (10). all have only 3 differnet content-types (double, integer and text). How can i solve this without a "definition" for each field?

name: { <<< bind this to a type, not to a name??? presence: true, length: { minimum: 3, message: "Please enter valid Name" }, format: { pattern: "[a-z]+", flags: "i", message: "Please enter valid Name" }, },

Thx for help, Andi


Mateusz Łubianka staff commented 4 years ago

Hi @a_luedke,

please, create a snippet showing your problem here: https://mdbootstrap.com/snippets/. I'll try to help you.

Best,



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.13.0
  • Device: All
  • Browser: Chrome
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No