Examples of minLength()


Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("trim:").append(
                            data.trim());
                if (data.mask() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("mask:")
                            .append("/^").append(data.mask()).append("$/");
                if (data.minlength() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("minlength:")
                            .append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("maxlength:")
                            .append(data.maxlength());
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                if (data.mask() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("mask:")
                            .append("/^").append(data.mask()).append("$/");
                if (data.minlength() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("minlength:")
                            .append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("maxlength:")
                            .append(data.maxlength());
                if (data.minvalue() != null)
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("minvalue:").append(
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                }
                if (data.mask() != null)
                    fieldInfo.append(",mask:").append("new RegExp(")
                            .append(JavaScriptBuilder.quote("^" + data.mask().toString() + "$"))
                            .append(")");
                if (data.minlength() != null)
                    fieldInfo.append(",minlength:").append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(",maxlength:").append(data.maxlength());
                if (data.minvalue() != null)
                    fieldInfo.append(",minvalue:").append(data.minvalue());
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                if (data.mask() != null)
                    fieldInfo.append(",mask:").append("new RegExp(")
                            .append(JavaScriptBuilder.quote("^" + data.mask().toString() + "$"))
                            .append(")");
                if (data.minlength() != null)
                    fieldInfo.append(",minlength:").append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(",maxlength:").append(data.maxlength());
                if (data.minvalue() != null)
                    fieldInfo.append(",minvalue:").append(data.minvalue());
                if (data.maxvalue() != null)
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                }
                if (data.mask() != null)
                    fieldInfo.append(",mask:").append("new RegExp(")
                            .append(JavaScriptBuilder.quote("^" + data.mask().toString() + "$"))
                            .append(")");
                if (data.minlength() != null)
                    fieldInfo.append(",minlength:").append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(",maxlength:").append(data.maxlength());
                if (data.minvalue() != null)
                    fieldInfo.append(",minvalue:").append(data.minvalue());
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.minlength()

                if (data.mask() != null)
                    fieldInfo.append(",mask:").append("new RegExp(")
                            .append(JavaScriptBuilder.quote("^" + data.mask().toString() + "$"))
                            .append(")");
                if (data.minlength() != null)
                    fieldInfo.append(",minlength:").append(data.minlength());
                if (data.maxlength() != null)
                    fieldInfo.append(",maxlength:").append(data.maxlength());
                if (data.minvalue() != null)
                    fieldInfo.append(",minvalue:").append(data.minvalue());
                if (data.maxvalue() != null)
View Full Code Here

Examples of org.internna.iwebmvc.core.validation.annotation.CollectionConstraint.minLength()

                            deepErrors.addAll(inner);
                            i++;
                        }
                        errors.addAll(deepErrors);
                    }
                    if (col.size() < collectionConstraint.minLength()) errors.add(new ValidationError(field.getName(), errorCodes[2], collectionConstraint, collection));
                    if (col.size() > collectionConstraint.maxLength()) errors.add(new ValidationError(field.getName(), errorCodes[3], collectionConstraint, collection));
                } else {
                    throw new IllegalArgumentException("The annotated element is not a collection [" + collection + "]");
                }
            }
View Full Code Here

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

                    if (!matcher.matches()) errors.add(new ValidationError(field.getName(), errorCodes[1], stringConstraint, object));
                } catch (Exception ex) {
                    throw new ValidationException(ex);
                }
            }
            if ((object != null) & (stringConstraint.minLength() > 0)) {
                if (object.toString().length() < stringConstraint.minLength()) errors.add(new ValidationError(field.getName(), errorCodes[2], stringConstraint, object));
            }
            if ((object != null) & (stringConstraint.maxLength() > 0)) {
                if (object.toString().length() > stringConstraint.maxLength()) errors.add(new ValidationError(field.getName(), errorCodes[3], stringConstraint, object));
            }
View Full Code Here

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

                } catch (Exception ex) {
                    throw new ValidationException(ex);
                }
            }
            if ((object != null) & (stringConstraint.minLength() > 0)) {
                if (object.toString().length() < stringConstraint.minLength()) errors.add(new ValidationError(field.getName(), errorCodes[2], stringConstraint, object));
            }
            if ((object != null) & (stringConstraint.maxLength() > 0)) {
                if (object.toString().length() > stringConstraint.maxLength()) errors.add(new ValidationError(field.getName(), errorCodes[3], stringConstraint, object));
            }
        }
View Full Code Here

Examples of org.jcodings.Encoding.minLength()

        int end = p + len;
        byte bytes[] = value.getUnsafeBytes();
        Encoding enc = value.getEncoding();

        keepCodeRange();
        if (enc.minLength() > 1) {
            int pp = enc.leftAdjustCharHead(bytes, p, end - enc.minLength(), end);
            if (enc.isNewLine(bytes, pp, end)) end = pp;
            pp = end - enc.minLength();
            if (pp >= p) {
                pp = enc.leftAdjustCharHead(bytes, p, pp, end);
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.