Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:21:45+00:00 2026-05-24T11:21:45+00:00

I have two custom validation rules (I have tested they work correctly): class PasswordResetKey

  • 0

I have two custom validation rules (I have tested they work correctly):

class PasswordResetKey extends AppModel {

    public $validate = array(

        'timestamp' => array(
            'rule' => '_notExpired',
            'message' => 'Your password reset link has expired. Please request another one.',
            'last' => true
        ),

        'key' => array(
            'rule' => '_validFormat',
            'message' => 'You do not appear to have used a valid password reset link. Please request another one.'
        )

    );

But no matter what I do, the errors returned are always:

Array
(
    [key] => You do not appear to have used a valid password reset link. Please request another one.
    [timestamp] => Your password reset link has expired. Please request another one.
)

Even when I check that the timestamp rule fails, it still goes on and checks the other rule for ‘key’ as well. I only want the timestamp error if it is there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:21:46+00:00Added an answer on May 24, 2026 at 11:21 am

    last is for multi rules per field. due to the fact that you only have one rule per field its always last and thus pointless.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a IEnumerable. I have a custom Interval class which just has two
So I have two custom complex types like this (oversimplified for this example): public
I have one registration page which uses custom valiadtor public class CustomValidator implements Validator
I have two custom validators that are in the same validation group. This validation
I have a custom validation rule to check if two passwords entered are the
I have a custom validation attribute which checks to see if two properties have
The scenario Suppose I have the following two model classes: public class ProductColor {
I have two custom controls that are analogous to a node and the control
I have two custom ActionFilters on an action. In first of the actionfilters, I
I have two lists of custom objects and want to update a field for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.