Class Index | File Index

## Classes

- _global_
- fec
- fec.base
- fec.config
- fec.cookies
- fec.errorCode
- fec.errorConfig
- fec.form
- fec.msg
- fec.util
- fec.valuesFactory
- FecMain
- FecPageControl

# Namespace fec.form

fec.util
Defined in: yaf4ajn.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| fec.form General form checking class - before data is submitted to the server, the formdata can be checked through javascript hooks (fecHookCheckFormXYZ).

Field Summary
Field Attributes | Field Name and Description
--- | ---
<static> | fec.form.errorCount Counts the form-errors
<static> | fec.form.isValid Keeps the state of form-validation, only if this property is true data will be submitted to the server.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | fec.form.checkIfFormValid() Checks if the form ist valid and returns true or shows the ErrorBox.
<static> | fec.form.checkRegex(regex, value) regex check helper function
<static> | fec.form.checkTypeDate(val) checks if String is a date
<static> | fec.form.checkTypeDateInPast(val) checks if the input value is in the past
<static> | fec.form.checkTypeEmail(val) Checks if the input value is a email adresse - intentionally weak check.
<static> | fec.form.checkTypeHausnummerMitZusatz(val) checks if the input value is a HausnummerMitZusatz ;)
<static> | fec.form.checkTypeNumber(val) Checks if the value is a number.
<static> | fec.form.checkTypePostleitzahl(val) checks if the input value is a german zipcode
<static> | fec.form.checkTypeString(input, manda, min, max, text) Checks if a string validates to certain conditions and adds errors if its not.
<static> | fec.form.clearErrorsInDom() Clear the errors on the page and try to remove error-CSS-classes.
<static> | fec.form.initFormValidation() Prepares the page for JS-Form Validation.
<static> | fec.form.setElementReadonly(element, setIt) Set an HTML input field to readonly.
<static> | fec.form.setErrorInDom(element, errtxt) Adds an error to the DOM and tries to change the class of the surrounding HTML code of the input field
<static> | fec.form.stringToDate(val) Converts a date Sring DD.MM.YYYY to date object

Namespace Detail
fec.form
General form checking class - before data is submitted to the server, the formdata can be checked through javascript hooks (fecHookCheckFormXYZ). This class contains functions for validation.

See:
  FecMain.checkForm

Field Detail
<static> {number} fec.form.errorCount
Counts the form-errors

<static> {boolean} fec.form.isValid
Keeps the state of form-validation, only if this property is true data will be submitted to the server.
Method Detail
<static> {boolean} fec.form.checkIfFormValid()
Checks if the form ist valid and returns true or shows the ErrorBox.

Returns:
  {boolean} valid or not

<static> {boolean} fec.form.checkRegex(regex, value)
regex check helper function

Parameters:
{Regex} regex
  - the regex test string
{string} value
  - String on which the regex-condition is tested

Returns:
  {boolean}

<static> {boolean} fec.form.checkTypeDate(val)
checks if String is a date

Parameters:
{object} val
  - input value

Returns:
  {boolean} is a Date-object or not

<static> {boolean} fec.form.checkTypeDateInPast(val)
checks if the input value is in the past

Parameters:
{object} val
  - input value

Returns:
  {boolean}

<static> {boolean} fec.form.checkTypeEmail(val)
Checks if the input value is a email adresse - intentionally weak check. Serverside validation should go deeper.

Parameters:
{object} val
  - input value

Returns:
  {boolean}

<static> {boolean} fec.form.checkTypeHausnummerMitZusatz(val)
checks if the input value is a HausnummerMitZusatz ;)

Parameters:
{object} val
  - input value

Returns:
  {boolean}

<static> {boolean} fec.form.checkTypeNumber(val)
Checks if the value is a number.

Parameters:
{object} val
  - input value

Returns:
  {boolean} number or not

<static> {boolean} fec.form.checkTypePostleitzahl(val)
checks if the input value is a german zipcode

Parameters:
{object} val
  - input value

Returns:
  {boolean}

<static> {boolean} fec.form.checkTypeString(input, manda, min, max, text)
Checks if a string validates to certain conditions and adds errors if its not.

Parameters:
{object} input
  - HTML input value element
{boolean} manda
  - is it mandatory?
{number} min
  - minimal string length
{number} max
  - maximal string length
{string} text
  - The beginning of the error message, e.G. "The name" or "The birthday".

Returns:
  {boolean} valid or not

<static> fec.form.clearErrorsInDom()
Clear the errors on the page and try to remove error-CSS-classes.

<static> fec.form.initFormValidation()
Prepares the page for JS-Form Validation. This method is called from the JS-validation-hook-functions.

See:
  fecHookCheckFormScopename

<static> fec.form.setElementReadonly(element, setIt)
Set an HTML input field to readonly.

Parameters:
{object} element
  - HTML input value element
{boolean} setIt
  - set it to readonly or not

<static> fec.form.setErrorInDom(element, errtxt)
Adds an error to the DOM and tries to change the class of the surrounding HTML code of the input field

Parameters:
{object} element
  - HTML-Element that should me marked
{string} errtxt
  - Errortext

<static> {Date|null} fec.form.stringToDate(val)
Converts a date Sring DD.MM.YYYY to date object

Parameters:
{String} val
  - Datestring in format DD.MM.YYYY

Returns:
  {Date|null} Date-object or null

Documentation generated by JsDoc Toolkit 2.1.0 on Mon Mar 09 2009 11:54:50 GMT+0100 (CET)