Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form validation Confirmation strict comparison #15252

Closed
InstaDaky opened this issue Jan 6, 2021 · 3 comments · Fixed by #15347
Closed

form validation Confirmation strict comparison #15252

InstaDaky opened this issue Jan 6, 2021 · 3 comments · Fixed by #15347
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low

Comments

@InstaDaky
Copy link

Hi guys,
we have a problem using password confirmation validator,

When we use the confirmation form validation it doesn't consider the type of the data. which is a problem when comparing numbers .
This returns true for 000012345 = 12345

it should be either return strcmp($a, $b) === 0;
or allow us to override the compare method, which we cannot at the moment because of final protected

thanks

@Jeckerson
Copy link
Member

Hello! It really seems to be the bug.

You can also create your own elements by extending the Phalcon\Forms\Element\ElementInterface interface (https://docs.phalcon.io/4.0/en/api/phalcon_forms#forms-element-elementinterface).

@Jeckerson Jeckerson added 4.1.1 The issues we want to solve in the 4.1.1 release bug A bug report status: low Low labels Jan 6, 2021
@Jeckerson Jeckerson added 5.0 The issues we want to solve in the 5.0 release and removed 4.1.1 The issues we want to solve in the 4.1.1 release labels Mar 26, 2021
@Jeckerson
Copy link
Member

/cc @Izopi4a

Izopi4a added a commit to Izopi4a/cphalcon that referenced this issue Mar 27, 2021
Izopi4a added a commit to Izopi4a/cphalcon that referenced this issue Mar 27, 2021
@niden niden linked a pull request Mar 27, 2021 that will close this issue
5 tasks
niden added a commit that referenced this issue Mar 27, 2021
fix #15252 - compare 000012345 and 12345
@niden
Copy link
Sponsor Member

niden commented Mar 27, 2021

Resolved with #15347

@niden niden added this to Working on it in Phalcon Roadmap Mar 27, 2021
@niden niden closed this as completed Mar 27, 2021
Phalcon Roadmap automation moved this from Working on it to Implemented Mar 27, 2021
@niden niden moved this from Implemented to Released in Phalcon Roadmap Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low
Projects
Archived in project
Phalcon Roadmap
  
Released
Development

Successfully merging a pull request may close this issue.

3 participants