~mparic/+junk/openauctionlive

« back to all changes in this revision

Viewing changes to app/models/item.php

  • Committer: Michael Paric
  • Date: 2012-01-07 20:21:14 UTC
  • Revision ID: mparic@compbizsolutions.com-20120107202114-6q89jiel6y3rbwgc
Updated validation rules to prevent duplicate Bid and Bidder entries; updated return message color for successful form entry to differentiate from error; added simlink in img/ for image to be used in reports - just change what auction_logo.jpg points to instead of changing View code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    
30
30
    var $validate = array(
31
31
        'title' => array('rule' => array('notEmpty')),
32
 
        'value' => array('rule' => array('money','left'),'message' => 'Must Be a Number'),
 
32
        'value' => array(
 
33
                        'money' => array(
 
34
                                'rule' => array('money'),
 
35
                                'message' => 'Not a valid monetary amount'
 
36
                        ),
 
37
                        'numeric' => array(
 
38
                                'rule' => array('numeric'),
 
39
                                'message' => 'Must be in XX or XX.XX format; no $ or letters'
 
40
                        ),
 
41
                        'notEmpty' => array(
 
42
                                'rule' => array('notempty'),
 
43
                                'message' => 'Amount Required',
 
44
                                'required' => true
 
45
                        )
 
46
                ),
33
47
        'vendor_id' => array('rule' => array('notEmpty')),
34
48
        'item_category_id' => array('rule' => array('notEmpty')),
35
49
        'item_type_id' => array('rule' => array('notEmpty'))