Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

prepareRegexp() method in (Not)MatchValidator and PCRE flags #300

Open
ghost opened this Issue · 2 comments

2 participants

@ghost

Automatic checking and placement of surrounding '/' marks in method prepareRegexp() making use of PCRE flags in pattern impossible:

if ($exp{0} !== '/' || $exp{strlen($exp)-1} !== '/' ) {
    $exp = '/' . $exp . '/';
}

This is very important issue for international languages. For example, following match rule, applied to unicode string with cyrillic characters, will not work as it should:

<validator column="name">
    <rule name="match" value="/^[а-яё]+$/ui" />
</validator>
@willdurand
Owner

@solisted can you work on a patch ?

@kirankotari

Hi I have a question, In my project I used propel php and I created databases with respective validation statements in xml file

not I am using pfbc (php form builder classes) for GUI

Now I need to validate using database validations statements, to not enter invalid data.
But I am struggling how to add the statements like

$name->validate // name is table name , validation is validation rule defined in xml
now from the form I get $_POST['FirstName'] now I need to compare or validate FirstName based on my name validation rules?

May I Know how I works ??
Please
help me??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.