Skip to content

Instantly share code, notes, and snippets.

View Edofre's full-sized avatar
🐈

Edo Freriks Edofre

🐈
View GitHub Profile
<?php
namespace common\components\validators;
class PriceValidator extends \yii\validators\RegularExpressionValidator
{
public $pattern = '/^[0-9]*[.,]{0,1}[0-9]{0,2}$/'; // 12,10 OR 12.10
}