Project

General

Profile

Actions

Feature #69035

closed

EXT:form - Allow rules inside form objects

Added by Björn Jacob over 9 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2015-08-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Right now it's necessary to place the validation rules within a separate area, i.e. they belong directly to the FORM object.

10 = FORM
10 {
  10 = TEXTLINE
  10 {
    name = lastName
    label = Last name
  }
  ...
  rules {
    10 = required
    10 {
      element = lastName
    }
    20 = alphabetic
    20 {
      element = lastName
      allowWhiteSpace = 1
    }
  }
}

When having a lot of fields the whole setup will be become very cluttered. Therefore it would be better to be able to have the validation rules directly stored inside the specific FORM objects.

10 = FORM
10 {
  10 = TEXTLINE
  10 {
    name = lastName
    label = Last name
    rules {
      10 = required
      20 = alphabetic
      20 {
        allowWhiteSpace = 1
      }
    }
  }
}

For backward compatibility the rules should still be possible outside the FORM objects. Furthermore it still makes sense to define rules at this central position (for exampling setting up global spam rules).

Actions

Also available in: Atom PDF