Jasmine Wiki

Navigation

Wiki Home
Installing Framework
Configuring jasmine.php

Database Module
MySQL
Mysqlix
ODBC
MSSQL

Database Objects
Datagrid
Datasource
Repeater
SQLQuery

Files Module
File
FileSystem
FTP
Attachment
ExcelFile

Graphics Module
Color
Image
Graph


Miscellaneous
Classes:
NumbWordter
Email
Poll
Shield
XMLParser

Functions:
General Functions
HTML Functions
Validation Functions
TrackThisPage

 

Validation Functions

Validation functions are those that come handy when validating data.

bool isEmail ($emailID)
Returns true if it is valid email ID or false if not.
e.g. echo 'Your email ID is ' . ( isEmail ($myEmail) ? 'valid' : 'invalid' );

bool isNull ($var)
Returns true if null or not assigned a value, or false if value is assigned.
e.g. echo isNull($stream) ? 'No stream is selected' : $stream . 'is your stream';

bool isString ($text)
Returns true if it is a text, or else false.
e.g. echo isString ($text);

bool isNumber ($number, [$allowIntOrFloatVals])
Returns true if it is a positive number. If second parameter is set true, then the number is checked against float and integer values (positive and negative).
e.g.
echo 'The reference number entered is ' . ( isNumber ($myEmail) ? 'valid' : 'invalid' );
echo 'The math integer entered is ' . ( isNumber ($myEmail, true) ? 'valid' : 'invalid' );
(c) 2008 Jasmine Framework. A Creation by Krishna Srikanth.