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

  • SEARCH
  • Home
  • 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 8465703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:07:34+00:00 2026-06-10T15:07:34+00:00

I have a simple create new account page with username, email, confirm email, password,

  • 0

I have a simple create new account page with username, email, confirm email, password, and confirm passwords fields. All of the validations goes under the User model and currently all the input fields are required.

Once the user logs in, there’s a setting page where they can update their email and password. The input fields are email, confirm email, password, and confirm password (same input fields as the create an account page sans username field). However, I want the validations to be different under settings with none of the fields being required. How would I approach this problem without affecting the validation rules for the create new account page? Your help is much appreciated.

  • 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-06-10T15:07:36+00:00Added an answer on June 10, 2026 at 3:07 pm

    It doesn’t seem like you really need ANY of the fields “required” as CakePHP thinks of it.

    “Required” as far as CakePHP is concerned means that that field MUST be submitted any and every time that model is saved. It has nothing to do with whether or not there is content in the field (which is ‘notEmpty’).

    So – for your case, you could probably just set up the normal data validation rules for each field (ie minLength, notEmpty, valid email…etc etc, etc, and be just fine for both pages. Any data that’s submitted must pass the validation – and if it’s not submitted, no big deal.

    You could always set:

    'required' => 'create' //or update
    

    if you need to verify that that field exists in the data for a save or update… but I’ve personally never found that necessary and have created many pages like you’ve described.

    Per the book [here]:

    required => true does not mean the same as the validation rule
    notEmpty(). required => true indicates that the array key must be
    present – it does not mean it must have a value. Therefore validation
    will fail if the field is not present in the dataset, but may
    (depending on the rule) succeed if the value submitted is empty (‘’).

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

Sidebar

Related Questions

I am new to web programming...I have been asked to create a simple Internet
I am creating a simple console Application in .Net to create a New Account
I am making a simple email application in Java. I have an Account class.
I am new to Repository concept and get some questions. I have created simple
I have created a simple WordPress plugin that automatically sets my new sites up
I have a pretty simple trigger: CREATE OR REPLACE FUNCTION f_log_datei() RETURNS TRIGGER AS
I have simple table in Sybase -- Creating table 'SimpleText' CREATE TABLE [dbo].[SimpleText] (
I have simple table creating script in Postgres 9.1. I need it to create
So I have a simple web app where I can create a user (UserModel)
So right now I have a simple canvas element with functions that create random

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.