Skip to content

Instantly share code, notes, and snippets.

<validator name="atleastonerecipient" class="arraylength">
<arguments>
<argument>to</argument>
</arguments>
<ae:parameters>
<ae:parameter name="min">1</ae:parameter>
</ae:parameters>
<errors>
<error>Valitse vähintään yksi sähköpostiosoite</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations
xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"
parent="%core.module_dir%/CoveringNotes/config/validators.xml"
>
<ae:configuration>
<validators method="write">
<validator class="string" provides="normal_login_set" required="false">
<?xml version="1.0" encoding="utf-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:svg="http://www.w3.org/2000/svg">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title>Application Error</title>
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="none" />
<style type="text/css">
html {
background-color: #EEE;
<?php
$validationManager = new AgaviValidationManager();
$method = 'write';
$validationManager->initialize($this->getContext());
$validationConfig = AgaviConfig::get('core.module_dir') . '/Default/validate/Login.xml';
require(AgaviConfigCache::checkConfig($validationConfig, $this->context->getName()));
$validators = array();
foreach($validationManager->getChilds() as $child) {
$validators[] = array(
'validatorName' => $child->getName(),
<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations
xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"
parent="%core.module_dir%/Admin/config/validators.xml"
>
<ae:configuration>
<validators method="write">
<validator class="file">
<script type="text/javascript">
var uploadUrl = '<?php echo $ro->gen('admin.files.upload+json', array(session_name() => session_id()));?>';
</script>
$(function() {
$('.delete').click(function() {
$.ajax({
url: $(this).attr('href'),
type: 'DELETE',
success: function(data, status, request) {
alert(data.message);
}
});
return false;
$('.deleterow').click(function() {
var anchor = $(this);
anchor.parent().parent().fadeOut(function() {
//$.getJSON(anchor.attr('href'), function() { alert('success')});
alert('foo');
});
return false;
});
<validator class="or">
<validators>
<validator class="number" required="false">
<argument>foo</argument>
<error>not valid number</error>
</validator>
<validator class="number" required="false">
<argument>bar</argument>
<error>not valid number</error>
</validator>
set_include_path(
get_include_path() . PATH_SEPARATOR .
AgaviConfig::get('core.app_dir').'/lib/propel' . PATH_SEPARATOR .
realpath(dirname(__FILE__).'/../libs')
);