Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.temp.shared.validators;

import org.litesoft.core.util.externalization.*;

import com.temp.shared.*;

public class RequiredValueValidator implements ValueValidator {
    public static final String TEMPLATE_ID_CODE = "Required";

    public static final ValueValidator INSTANCE = new RequiredValueValidator();

    private RequiredValueValidator() {
    }

    @Override
    public E13nData checkValue( Object value ) {
        if ( value != null ) {
            if ( !(value instanceof String) || (((String) value).trim().length() != 0) ) {
                return null; // !null && (!String || String ! Empty)
            }
        }
        return new E13nData( TEMPLATE_ID_CODE );
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/shared/validators/RequiredValueValidator.java

Diff revisions: vs.
Revision Author Commited Message
950 Diff Diff GeorgeS picture GeorgeS Thu 19 Jun, 2014 17:57:04 +0000

New Lines

948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

724 Diff Diff GeorgeS picture GeorgeS Mon 11 Jun, 2012 00:47:26 +0000
600 Diff Diff GeorgeS picture GeorgeS Sun 05 Feb, 2012 18:55:58 +0000

Sync-n

595 GeorgeS picture GeorgeS Sat 21 Jan, 2012 16:54:12 +0000