[solved] Validations for form under control ?

Status
Not open for further replies.
Hi friends,
since 3-4 days I've issues with "Validation" on element ( "Not empty" or "php for replace").
YES now we have a real good informations (notice) about Eval/ and this is a real good feature (Could easialy remove some notice by this way;).

But this is not the big issue, I redo a fresh and update test and still i've this issue....
1) Make a new list
"Contact"​
Elements :​
a) last_name (field /max 60 / validation : Not empty + php (replace ) :​
PHP:
$name = mb_convert_case($data, MB_CASE_UPPER,"UTF-8");[/INDENT][/INDENT]
[INDENT=5][INDENT=5]return '$name';
b) first_name (field /max 60 / validation : php (replace ) :​
PHP:
$first_name = mb_convert_case($data, MB_CASE_TITLE, "UTF-8");[/INDENT][/INDENT]
[INDENT=5][INDENT=5]return $first_name;
c) last_name, first_name (calc /only calc on save : Yes)​
PHP:
return '{pg_contacts___last_name} {pg_contacts___first_name}';
2) Form template Front : bootstrap_tabs / Buttons : Save / Apply / Return /
If I create an entrie without Validation published, it's ok fields and calc could be add and edit,​
If I enable one Validation for a) Not empty : I've the list with my entrie, want to edit the last_name, then Apply, form remove the a) data into db, So my Validation Not empty Block the form ! (I look on database, nomore last name after apply), but the first name without validation activate still into the db.​
So If I've validation ON on the form, when i edit the entrie, I loose data ... If I don't enable Validation at all, form and datas are like expect.

I do this 3 times this night, 3 builds from Fresh J!3.11 + Fb3.1b from Website + UpdateFromGit ... Nobody else ?

note : I could not remove the Indent tag into the code, I don't add this tag (or mistaks) and I could not remove tags into the code ;)
 
H?h?, Seems the Regex Validation is ok ... I've this one :
Code:
/^(\d{2} \d{2} \d{2} \d{2} \d{2})?$/
And this validation is the only one I could let publish into my form and if I edit the record i don't have the issue explain in this post.
 
Ok Re do All things from fresh install same, It's my code for Upcase the string who is doing the issue (Replace with null string when edit or save)
PHP:
$name = mb_convert_case($data, MB_CASE_UPPER, "UTF-8");
return $name;
Could somebody help me please for having this ok under a Field's validation php Replace.

Note this code was working before, so preatty sure the code is ok but no more with the actual version of fabrik...
 
Ok seems not my code it's more the php validation plugin when he have to "replace".
PHP:
$data=1;
return $data;
Return nothing too !
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top