I will get my app online sometime in the next week.
I’ve had a few people in my organization ask to be able to play with the development version so it is just a matter of my making time to get it online (and replace all the data with fake data…)
Here is one more change to implement the length is validation: (I use the rangelength validation rule to implement it.)
In EJFValidate.php:
Find:
elseif($ruleName == 'length')
{
// This rule has no direct equivalent in the plugin, it must be splited
// into 2 JS rules : min and max
if( isset($ruleParams['min']) ) {
$this->_rules[$attrActiveName]['minlength'] = $ruleParams['min'];
$this->addValidatorMessage($attrName,$attrActiveName,'minlength',$ruleParams);
}
if( isset($ruleParams['max'])) {
$this->_rules[$attrActiveName]['maxlength'] = $ruleParams['max'];
$this->addValidatorMessage($attrName,$attrActiveName,'maxlength',$ruleParams);
}
Replace With:
elseif($ruleName == 'length')
{
// This rule has no direct equivalent in the plugin, it must be splited
// into 2 JS rules : min, max, and is
if( isset($ruleParams['min']) ) {
$this->_rules[$attrActiveName]['minlength'] = $ruleParams['min'];
$this->addValidatorMessage($attrName,$attrActiveName,'minlength',$ruleParams);
}
if( isset($ruleParams['max'])) {
$this->_rules[$attrActiveName]['maxlength'] = $ruleParams['max'];
$this->addValidatorMessage($attrName,$attrActiveName,'maxlength',$ruleParams);
}
if( isset($ruleParams['is'])) {
$this->_rules[$attrActiveName]['rangelength'] = array($ruleParams['is'],$ruleParams['is']);
$this->addValidatorMessage($attrName,$attrActiveName,'rangelength',$ruleParams);
}
Find:
'minlength' => Yii::t('yii','{attribute} is too small (minimum is {min}).'),
'maxlength' => Yii::t('yii','{attribute} is too big (maximum is {max}).'),
Add Below:
'rangelength' => Yii::t('yii','{attribute} is of the wrong length (should be {is} characters).'),
I used to write modifications for Invision Power Board which resulted in writing lots of manuals on how to properly edit the code so that is where my code changes style comes from.