Android Open Source - Gui2Go Text Validator






From Project

Back to project page Gui2Go.

License

The source code is released under:

MIT License

If you think the Android project Gui2Go listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ami.gui2go.utils;
/* w  w w. j  a  v a2 s  . c  o m*/
public class TextValidator
{  
  public static boolean isNameFieldValid(String fieldText)
  {
    boolean result = true;
    if (fieldText.isEmpty() || fieldText.contains(",")
        || fieldText.contains(".")
        || fieldText.contains("/")
        || fieldText.contains("\\")
        || fieldText.contains("!")
        || fieldText.contains("@")
        || fieldText.contains("#")
        || fieldText.contains("$")
        || fieldText.contains("%")
        || fieldText.contains("^")
        || fieldText.contains("&")
        || fieldText.contains("*")
        || fieldText.contains("(")
        || fieldText.contains(")")
        || fieldText.contains("\"")
        || fieldText.contains(":")
        || fieldText.contains("=")
        || fieldText.contains("+")
        || fieldText.contains("?")) {
      result = false;
    }
    
    if(fieldText.length() > 20){
      result = false;
    }
    return result;
  }
}




Java Source Code List

com.ami.gui2go.ActivityManager.java
com.ami.gui2go.EditorActivity.java
com.ami.gui2go.FileDialogFragment.java
com.ami.gui2go.GridViewItemClickListener.java
com.ami.gui2go.HomeActivity.java
com.ami.gui2go.LongClickListener.java
com.ami.gui2go.ProjectManagerActivity.java
com.ami.gui2go.ResourceManagerActivity.java
com.ami.gui2go.UserGuideActivity.java
com.ami.gui2go.models.ActivityInfo.java
com.ami.gui2go.models.ProjectInfo.java
com.ami.gui2go.models.WidgetAttribute.java
com.ami.gui2go.models.WidgetTypes.java
com.ami.gui2go.models.WidgetWrapper.java
com.ami.gui2go.models.Widget.java
com.ami.gui2go.tree.AbstractTreeViewAdapter.java
com.ami.gui2go.tree.InMemoryTreeNode.java
com.ami.gui2go.tree.InMemoryTreeStateManager.java
com.ami.gui2go.tree.NodeAlreadyInTreeException.java
com.ami.gui2go.tree.NodeNotInTreeException.java
com.ami.gui2go.tree.SimpleStandardAdapter.java
com.ami.gui2go.tree.TreeBuilder.java
com.ami.gui2go.tree.TreeConfigurationException.java
com.ami.gui2go.tree.TreeNodeInfo.java
com.ami.gui2go.tree.TreeStateManager.java
com.ami.gui2go.tree.TreeViewList.java
com.ami.gui2go.utils.FileHelper.java
com.ami.gui2go.utils.LayoutXMLCreator.java
com.ami.gui2go.utils.ProjectXMLParser.java
com.ami.gui2go.utils.TextValidator.java
com.ami.gui2go.views.ColorPickerDialog.java