object CustomCombinators
An object that provides custom combinators of com.wix.accord
- Alphabetic
- By Inheritance
- CustomCombinators
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def decimal(min: Int = 0, max: Int = Integer.MAX_VALUE, scale: Int = 0): Validator[String]
A validator that validates whether the given string forms the decimal format.
A validator that validates whether the given string forms the decimal format. The decimal format is
12345.678
like.- min
The minimum length of the decimal part
- max
The maximum length of the integer part
- scale
The length of the fractional part
- returns
The validator
scala> import com.wix.accord._ scala> import lerna.validation.CustomCombinators._ scala> validate("123.45")(decimal(min=0,max=4,scale=2)) res0: Result = Success scala> validate("123.")(decimal(min=3,max=5,scale=0)) res1: Result = Success scala> validate("123.45")(decimal(min=4,max=6,scale=2)).isSuccess res3: Boolean = false scala> validate("123.45")(decimal(min=1,max=2,scale=2)).isSuccess res3: Boolean = false scala> validate("123.45")(decimal(min=0,max=10,scale=3)).isSuccess res3: Boolean = false
- Note
All of
min
,max
andscale
are not well checked. This validator behaves weirdly with some parameter combinations. The behavior will be changed.
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lengthRange(min: Int = 0, max: Int = Integer.MAX_VALUE): Validator[String]
A validator that validates whether the length of the given string is in range.
A validator that validates whether the length of the given string is in range.
- min
The minimum of the range (inclusive)
- max
The maximum of the range (inclusive)
- returns
The validator
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- lazy val 全角: Validator[String]
A validator that validates whether all characters of the given string is 全角
A validator that validates whether all characters of the given string is 全角
全角 is the one that is not 半角.
- returns
The validator
- lazy val 半角: Validator[String]
A validator that validates whether all characters of the given string is 半角
A validator that validates whether all characters of the given string is 半角
半角 is either 半角英数字記号 or 半角カナ.
- returns
The validator
- lazy val 半角数字: Validator[String]
A validator that validates whether all characters of the given string is 半角数字
A validator that validates whether all characters of the given string is 半角数字
- returns
The validator
- lazy val 半角英数字: Validator[String]
A validator that validates whether all characters of the given string is 半角英数字
A validator that validates whether all characters of the given string is 半角英数字
- returns
The Validator
- lazy val 半角英数字記号: Validator[String]
A validator that validates whether all characters of the given string is 半角英数字記号.
A validator that validates whether all characters of the given string is 半角英数字記号.
- returns
The validator