]> git.mxchange.org Git - jcoreee.git/blobdiff - src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java
Some improvements
[jcoreee.git] / src / org / mxchange / jsfcore / validator / string / BaseStringValidator.java
index 43aa7c1aac05df1dacc13c730ba2358748b52726..02df4f2830811a65fcd1b2672165de840d0f91a3 100644 (file)
@@ -32,15 +32,6 @@ import org.mxchange.jsfcore.validator.BaseObjectValidator;
  */
 public abstract class BaseStringValidator extends BaseObjectValidator {
 
-       /**
-        * Pre-validation of value, e.g. not null
-        *
-        * @param context FacesContext instance
-        * @param component UIComponent instance
-        * @param value Value to check
-        * @param requiredFields Array of required field names (ending with)
-        * @throws ValidatorException If something more horrible went wrong
-        */
        @Override
        protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {
                // Trace message
@@ -54,13 +45,14 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                FacesMessage facesMessage = null;
                String errKey;
 
-               // So far all fine!
+               // So far all fine, no check if the field is fine
                for (final String field : requiredFields) {
                        // Debug message
                        this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N
 
                        // Is it the same?
                        if (clientId.endsWith(field)) {
+                               // Compare value's type
                                if (!(value instanceof String)) {
                                        // Value is empty
                                        errKey = String.format("error.%s.is_not_string", field); //NOI18N