Back to project page Gui2Go.
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.
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; } }