Jump to content

techstar123

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by techstar123

  1.  

    Is this the entirety of your validation? If so, that is not sufficient, and the reason you're able to continue on to the next page is because no validation occurs.

     

    You have defined a rule in $rules, but never use it for Input validation, e.g.

    public function validateService($package, $vars=null) {
        $rules = array(
            ...
        );
    
        $this->Input->setRules($rules);
        return $this->Input->validates($vars);
    }
    

     

    I have added last 2 lines. But I forgot to add it here.

    Validations are occcuring. It is showing me my error message.

  2. i think this rule is enough

    'organization' => array(

    'format' => array(

    'rule' => "isEmpty",

    'negate' => true,

    'message' => "Organization name is required" )

    )

    but your probleme i think is not the validator , is how/where the validateservice should act .

    normally if the validation return error , it should not go to next stop , is sending a error set and then the page should not go to other page .

    Yes, my problem is page is going to other page. Actually it should not redirect if there is error.

  3. at least paste your code of validation and the fields you need to validate .

     

    public function validateService($package, array $vars=null) {

       $rules = array(

           'organization' => array(

                    'empty' => array(

                        'if_set' => true,

                        'rule' => 'isEmpty',

                        'negate' => true,

                        'message' => "Organization name is required"

                    )

                )

      );

    }

  4. You'll need to provide more details on what you're trying to do. It sounds like you're working with a domain module, but you may not have setup your validation rules correctly.

     

    My validations are getting fired for domain fields. But it does not keep open same page where error occurred. Instead of it allow me to register next domain.

     

    Steps:

    1. I checked my domain is available or not.

    2. if my domain is available, I tried to give additional fields(with incorrect values, so validations can get fired) and nameservers details.

    3. Since I have entered invalid details it shows me message "Invalid details provided"(my validation message).

     

    But then it does not keep open the same page where I have entered invalid details. Instead it opens new page where I can register new domain. So, I have to manually press back button of browser and then I can enter valid details.

  5. Hi,

    I have added validations for additional fields for domain using validateservice method.

    But once validation fires it does not show those additional fields insted it shows only nameservers fields. How can I resolve it?

     

    Once those validation fires and user press conitnue button it is moved to next view without having domain name.

×
×
  • Create New...