function ValidateInput()
	{
		require_once("ValidationResponse.php");
		$vr = new ValidationResponse();

		$save = RequestUtil::Get("SaveInline");

		$obj = $this->LoadFromForm();

		if (!is_object($obj))
		{
			$vr->Success = false;
			$vr->Errors = array("Unknown"=>"LoadFromForm does not appear to be implemented.  Unable to validate");
			$vr->Message = "LoadFromForm does not appear to be implemented.  Unable to validate";
		}
		elseif ($obj->Validate())
		{
			$vr->Success = true;
		}
		else
		{
			$vr->Success = false;
			$vr->Errors = $obj->GetValidationErrors();
			$vr->Message = "Validation Errors Occured";
		}

		// if the user requested to save inline, their Save method will take over from here
		if ($vr->Success && $save)
		{
			$this->Save();
		}
		else
		{
			$this->RenderJSON($vr);
		}
	}
function ValidateInput()
	{
		require_once("ValidationResponse.php");
		$vr = new ValidationResponse();

		$save = RequestUtil::Get("SaveInline");

		$obj = $this->LoadFromForm();

		if (!is_object($obj))
		{
			$vr->Success = false;
			$vr->Errors = array("Unknown"=>"LoadFromForm does not appear to be implemented.  Unable to validate");
			$vr->Message = "LoadFromForm does not appear to be implemented.  Unable to validate";
		}
		elseif ($obj->Validate())
		{
			$vr->Success = true;
		}
		else
		{
			$vr->Success = false;
			$vr->Errors = $obj->GetValidationErrors();
			$vr->Message = "Validation Errors Occured";
		}

		// if the user requested to save inline, their Save method will take over from here
		if ($vr->Success && $save)
		{
			$this->Save();
		}
		else
		{
			$this->RenderJSON($vr);
		}
	}
function ValidateInput ( ) { require_once ( "ValidationResponse.php" ) ; $ vr = new ValidationResponse ( ) ; $ save = RequestUtil :: Get ( "SaveInline" ) ; $ obj = $ this -> LoadFromForm ( ) ; if ( ! is_object ( $ obj ) ) { $ vr -> Success = false ; $ vr -> Errors = array ( "Unknown" => "LoadFromForm does not appear to be implemented.  Unable to validate" ) ; $ vr -> Message = "LoadFromForm does not appear to be implemented.  Unable to validate" ; } elseif ( $ obj -> Validate ( ) ) { $ vr -> Success = true ; } else { $ vr -> Success = false ; $ vr -> Errors = $ obj -> GetValidationErrors ( ) ; $ vr -> Message = "Validation Errors Occured" ; } // if the user requested to save inline, their Save method will take over from here
 if ( $ vr -> Success && $ save ) { $ this -> Save ( ) ; } else { $ this -> RenderJSON ( $ vr ) ; } }
This method calls LoadFromForm to retrieve a model object populated with user
input.  The input is validated and a ValidationResponse is rendered in JSON format

if Request::Get("SaveInline") is set then validate will call Save instead of
rendering JSON.  In which case, your Save method should render the ValidationResponse
This method calls LoadFromForm to retrieve a model object populated with user input . The input is validated and a ValidationResponse is rendered in JSON format