phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Rule Class Reference
+ Inheritance diagram for Rule:

Public Member Functions

 __construct ($type, $prompt=NULL, $value=NULL)
 
 getType ()
 
 setType ($type)
 
 getPrompt ()
 
 setPrompt ($prompt)
 
 getValue ()
 
 setValue ($value)
 
 jsonSerialize ()
 

Static Public Member Functions

static match ($name, $prompt=NULL)
 A field should match the value of another validation field, for example to confirm passwords.
 
static different ($name, $prompt=NULL)
 A field should be different than another specified field.
 
static integer ($min=NULL, $max=NULL, $prompt=NULL)
 A field is an integer value, or matches an integer range.
 
static decimal ($prompt=NULL)
 
static number ($prompt=NULL)
 
static is ($value, $prompt=NULL)
 
static isExactly ($value, $prompt=NULL)
 
static not ($value, $prompt=NULL)
 
static notExactly ($value, $prompt=NULL)
 
static contains ($value, $prompt=NULL)
 
static containsExactly ($value, $prompt=NULL)
 
static doesntContain ($value, $prompt=NULL)
 
static doesntContainExactly ($value, $prompt=NULL)
 
static minCount ($value, $prompt=NULL)
 
static maxCount ($value, $prompt=NULL)
 
static exactCount ($value, $prompt=NULL)
 
static email ($prompt=NULL)
 
static url ($prompt=NULL)
 
static regExp ($value, $prompt=NULL)
 
static custom ($name, $jsFunction)
 
static ajax (JsUtils $js, $name, $url, $params, $jsCallback, $method="post", $parameters=[])
 

Private Attributes

 $type
 
 $prompt
 
 $value
 

Detailed Description

Author
jc
Version
1.001 Generates a JSON Rule for the validation of a field

Definition at line 11 of file Rule.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $type,
  $prompt = NULL,
  $value = NULL 
)

Definition at line 26 of file Rule.php.

Member Function Documentation

◆ ajax()

static ajax ( JsUtils  $js,
  $name,
  $url,
  $params,
  $jsCallback,
  $method = "post",
  $parameters = [] 
)
static

Definition at line 170 of file Rule.php.

◆ contains()

static contains (   $value,
  $prompt = NULL 
)
static

Definition at line 126 of file Rule.php.

◆ containsExactly()

static containsExactly (   $value,
  $prompt = NULL 
)
static

Definition at line 130 of file Rule.php.

◆ custom()

static custom (   $name,
  $jsFunction 
)
static

Definition at line 166 of file Rule.php.

◆ decimal()

static decimal (   $prompt = NULL)
static

Definition at line 102 of file Rule.php.

◆ different()

static different (   $name,
  $prompt = NULL 
)
static

A field should be different than another specified field.

Parameters
string$name
string$prompt
Returns
\Ajax\semantic\components\validation\Rule

Definition at line 85 of file Rule.php.

◆ doesntContain()

static doesntContain (   $value,
  $prompt = NULL 
)
static

Definition at line 134 of file Rule.php.

◆ doesntContainExactly()

static doesntContainExactly (   $value,
  $prompt = NULL 
)
static

Definition at line 138 of file Rule.php.

◆ email()

static email (   $prompt = NULL)
static

Definition at line 154 of file Rule.php.

◆ exactCount()

static exactCount (   $value,
  $prompt = NULL 
)
static

Definition at line 150 of file Rule.php.

◆ getPrompt()

getPrompt ( )

Definition at line 41 of file Rule.php.

◆ getType()

getType ( )

Definition at line 32 of file Rule.php.

◆ getValue()

getValue ( )

Definition at line 50 of file Rule.php.

◆ integer()

static integer (   $min = NULL,
  $max = NULL,
  $prompt = NULL 
)
static

A field is an integer value, or matches an integer range.

Parameters
int | NULL$min
int | NULL$max
string$prompt
Returns
\Ajax\semantic\components\validation\Rule

Definition at line 96 of file Rule.php.

◆ is()

static is (   $value,
  $prompt = NULL 
)
static

Definition at line 110 of file Rule.php.

◆ isExactly()

static isExactly (   $value,
  $prompt = NULL 
)
static

Definition at line 114 of file Rule.php.

◆ jsonSerialize()

jsonSerialize ( )

Definition at line 60 of file Rule.php.

◆ match()

static match (   $name,
  $prompt = NULL 
)
static

A field should match the value of another validation field, for example to confirm passwords.

Parameters
string$name
string$prompt
Returns
\Ajax\semantic\components\validation\Rule

Definition at line 75 of file Rule.php.

◆ maxCount()

static maxCount (   $value,
  $prompt = NULL 
)
static

Definition at line 146 of file Rule.php.

◆ minCount()

static minCount (   $value,
  $prompt = NULL 
)
static

Definition at line 142 of file Rule.php.

◆ not()

static not (   $value,
  $prompt = NULL 
)
static

Definition at line 118 of file Rule.php.

◆ notExactly()

static notExactly (   $value,
  $prompt = NULL 
)
static

Definition at line 122 of file Rule.php.

◆ number()

static number (   $prompt = NULL)
static

Definition at line 106 of file Rule.php.

◆ regExp()

static regExp (   $value,
  $prompt = NULL 
)
static

Definition at line 162 of file Rule.php.

◆ setPrompt()

setPrompt (   $prompt)

Definition at line 45 of file Rule.php.

◆ setType()

setType (   $type)

Definition at line 36 of file Rule.php.

◆ setValue()

setValue (   $value)

Definition at line 54 of file Rule.php.

◆ url()

static url (   $prompt = NULL)
static

Definition at line 158 of file Rule.php.

Field Documentation

◆ $prompt

$prompt
private

Definition at line 19 of file Rule.php.

◆ $type

$type
private

Definition at line 15 of file Rule.php.

◆ $value

$value
private

Definition at line 24 of file Rule.php.


The documentation for this class was generated from the following file: