/var/www/vhosts/ihelp.ro/httpdocs/src/Model/Table
Edit: /var/www/vhosts/ihelp.ro/httpdocs/src/Model/Table/ProposedCausesTable.php (1793B)
setTable('proposed_causes');
$this->setDisplayField('id');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
}
/**
* Default validation rules.
*/
public function validationDefault(Validator $validator): Validator
{
$validator
->integer('id')
->allowEmptyString('id', null, 'create');
$validator
->scalar('cause_name')
->maxLength('cause_name', 255)
->requirePresence('cause_name', 'create')
->notEmptyString('cause_name');
$validator
->scalar('description')
->requirePresence('description', 'create')
->notEmptyString('description');
$validator
->scalar('full_name')
->maxLength('full_name', 250)
->requirePresence('full_name', 'create')
->notEmptyString('full_name');
$validator
->email('email')
->requirePresence('email', 'create')
->notEmptyString('email');
$validator
->integer('phone')
->requirePresence('phone', 'create')
->notEmptyString('phone');
$validator
->integer('donation_amount')
->requirePresence('donation_amount', 'create')
->notEmptyString('donation_amount');
return $validator;
}
}