Examples of regexp()


Examples of org.internna.iwebmvc.core.validation.annotation.StringConstraint.regexp()

        Set<ValidationError> errors = new HashSet<ValidationError>();
        if (stringConstraint != null) {
            if (stringConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], stringConstraint, object));
            if ((object != null) & (stringConstraint.regexp().length() > 0)) {
                try {
                    Pattern pattern = Pattern.compile(stringConstraint.regexp());
                    Matcher matcher = pattern.matcher(object.toString());
                    if (!matcher.matches()) errors.add(new ValidationError(field.getName(), errorCodes[1], stringConstraint, object));
                } catch (Exception ex) {
                    throw new ValidationException(ex);
                }
View Full Code Here

Examples of org.slim3.controller.validator.Validators.regexp()

     * @return バリデータ
     */
    private Validators getValidator() {
        Validators v = new Validators(request);
        v.add("name", v.required());
        v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
        v.add("phone", v.required(), v.regexp("0\\d+[\\-]\\d+[\\-]\\d+"));
        v.add("zipcode", v.required(), v.regexp("\\d{3}-\\d{4}"));
        v.add("address", v.required());
        return v;
    }
View Full Code Here

Examples of org.slim3.controller.validator.Validators.regexp()

     */
    private Validators getValidator() {
        Validators v = new Validators(request);
        v.add("name", v.required());
        v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
        v.add("phone", v.required(), v.regexp("0\\d+[\\-]\\d+[\\-]\\d+"));
        v.add("zipcode", v.required(), v.regexp("\\d{3}-\\d{4}"));
        v.add("address", v.required());
        return v;
    }

View Full Code Here

Examples of org.slim3.controller.validator.Validators.regexp()

    private Validators getValidator() {
        Validators v = new Validators(request);
        v.add("name", v.required());
        v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
        v.add("phone", v.required(), v.regexp("0\\d+[\\-]\\d+[\\-]\\d+"));
        v.add("zipcode", v.required(), v.regexp("\\d{3}-\\d{4}"));
        v.add("address", v.required());
        return v;
    }

    /**
 
View Full Code Here

Examples of org.slim3.controller.validator.Validators.regexp()

                    "uid",
                    v.required(),
                    v.maxlength(VALID_MAX_UID),
                    v.minlength(VALID_MIN_UID));
                v.add("name", v.required());
                v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
                if (v.validate()) {
                    if (!validateInsertUser(uid)) {
                        // 登録画面を表示
                        return forward("/user/regist.jsp");
                    }
View Full Code Here

Examples of org.slim3.controller.validator.Validators.regexp()

            if (checkAdmin()) {
                User tmp = getService().get(uid);
                if (tmp != null && tmp instanceof Administrator) {
                    Validators v = new Validators(request);
                    v.add("name", v.required());
                    v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
                    if (v.validate()) {
                        getService().put(uid, name, mail);
                        return redirect("/user/");
                    } else {
                        return forward("/user/edit.jsp");
View Full Code Here

Examples of org.sql.generation.api.grammar.factories.BooleanFactory.regexp()

                              + ( collectionIsSet ? "*{1,}" : collectionIndex );
                Boolean isCollection = ( item instanceof Collection<?> );
                BooleanBuilder newWhere = b.booleanBuilder();
                if( !isCollection )
                {
                    newWhere.reset( b.regexp( collColExp, l.s( path ) ) );
                }
                totalItemsProcessed
                = totalItemsProcessed
                  + modifyFromClauseAndWhereClauseToGetValue( qName, item, predicate,
                                                              negationActive,
View Full Code Here

Examples of org.sql.generation.api.grammar.factories.BooleanFactory.regexp()

                BooleanFactory b = vendor.getBooleanFactory();
                LiteralFactory l = vendor.getLiteralFactory();
                ColumnsFactory c = vendor.getColumnsFactory();

                builder.getWhere().reset(
                    b.regexp( c.colName( TABLE_NAME_PREFIX + lastTableIndex,
                                         DBNames.QNAME_TABLE_COLLECTION_PATH_COLUMN_NAME ), l
                        .s( DBNames.QNAME_TABLE_COLLECTION_PATH_TOP_LEVEL_NAME + ".*{1,}" ) ) );

                Object value = predicate.value();
                if( value instanceof Collection<?> )
View Full Code Here

Examples of org.sql.generation.api.grammar.factories.BooleanFactory.regexp()

                        throw new IllegalArgumentException(
                            "ContainsAllPredicate may not have nested collections as value." );
                    }

                    BooleanBuilder conditionForItem = b.booleanBuilder(
                        b.regexp( c.colName( TABLE_NAME_PREFIX + lastTableIndex,
                                             DBNames.QNAME_TABLE_COLLECTION_PATH_COLUMN_NAME ),
                                  l.s( DBNames.QNAME_TABLE_COLLECTION_PATH_TOP_LEVEL_NAME + ".*{1,}" ) ) );
                    modifyFromClauseAndWhereClauseToGetValue(
                        QualifiedName.fromAccessor( predicate.collectionProperty().accessor() ),
                        value, predicate, false, lastTableIndex,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.