Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • Accordion
  • ApiController
  • ArrayTool
  • CKEditor
  • Collection
  • Config
  • Controller
  • Country
  • Csv
  • Curl
  • Currency
  • Database
  • DataTable
  • Date
  • DOMNode
  • DOMParser
  • Email
  • File
  • Files
  • Form
  • Grid
  • Html
  • Htmldoc
  • HtmlTable
  • Image
  • InputItem
  • Inputs
  • KBase
  • Language
  • ListItem
  • Login
  • Menu
  • Mime
  • Model
  • Number
  • ObjectTool
  • Password
  • Pdf
  • Province
  • Router
  • Session
  • Singleton
  • Tab
  • TableRow
  • Template
  • Text
  • Validator
  • View

Exceptions

  • ApiException
  • InputItemException
  • Overview
  • Namespace
  • Class
  • Tree

Class Validator

คลาสสำหรับตรวจสอบความถูกต้องของตัวแปรต่างๆ

Kotchasan\KBase
Extended by Kotchasan\Validator
Namespace: Kotchasan
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/Validator.php
Methods summary
public static boolean
# email( string $email )

ตรวจสอบความถูกของอีเมล คืนค่า true ถ้ารูปแบบอีเมลถูกต้อง

ตรวจสอบความถูกของอีเมล คืนค่า true ถ้ารูปแบบอีเมลถูกต้อง

Parameters

$email

Returns

boolean

Assert

('admin@localhost.com') [==] true
('admin@localhost') [==] true
('ทดสอบ@localhost') [==] false
public static array|boolean
# isImage( array $excepts, array $file_upload )

ฟังก์ชั่นตรวจสอบไฟล์อัปโหลดว่าเป็นรูปภาพหรือไม่ คืนค่าแอเรย์ [width, height, mime] ของรูปภาพ หรือ false ถ้าไม่ใช่รูปภาพ.

ฟังก์ชั่นตรวจสอบไฟล์อัปโหลดว่าเป็นรูปภาพหรือไม่ คืนค่าแอเรย์ [width, height, mime] ของรูปภาพ หรือ false ถ้าไม่ใช่รูปภาพ.

Parameters

$excepts
ชนิดของไฟล์ที่ยอมรับเช่น array('jpg', 'gif', 'png')
$file_upload
รับค่ามาจาก $_FILES

Returns

array|boolean
Properties inherited from Kotchasan\KBase
$cfg, $request
Kotchasan API documentation generated by ApiGen