skinny

validator

package validator

Skinny validator provides easy-to-understand and readable DSLs to validate inputs.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. validator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Error(name: String, messageParams: Seq[Any]) extends ErrorLike with Product with Serializable

    Simple implementation of Error.

  2. trait ErrorLike extends AnyRef

    Validation error.

  3. case class Errors(errors: Map[String, Seq[Error]]) extends Product with Serializable

    Collection of errors.

    Collection of errors.

    errors

    Map value.

  4. case class FailuresProjection[+A](results: Validations, onSuccess: (Parameters) ⇒ A, onFailures: (Parameters, Errors) ⇒ A) extends ResultsProjection[A] with Product with Serializable

    Failures projection.

    Failures projection.

    A

    result type

    results

    results

    onSuccess

    success event handler

    onFailures

    failure event handler

  5. case class Form[A](validations: Validations, value: Option[A]) extends ValidatorLike with Product with Serializable

    Form object.

    Form object.

    A

    raw value type

    validations

    validations

    value

    value if exists

  6. case class I18nKeyParam(value: String) extends Product with Serializable

    Key for skinny.I18n messages.

  7. case class KeyValueParamDefinition(key: String, value: Any) extends ParamDefinition with Product with Serializable

    Key and value param definition.

    Key and value param definition.

    key

    key

    value

    value

  8. case class MapValidator(paramMap: Map[String, Any] = Map(), validations: Validations = Validations(Map(), Nil)) extends ValidatorLike with Product with Serializable

    Validator which accepts Map value as inputs.

    Validator which accepts Map value as inputs.

    paramMap

    param as a Map value

    validations

    registered validations

  9. class Messages extends AnyRef

    Messages for validation errors.

  10. case class NewValidation(paramDef: ParamDefinition, validations: ValidationRule) extends ValidationState with Product with Serializable

    Newly created validation which hasn't be applied yet.

    Newly created validation which hasn't be applied yet.

    paramDef

    param definition

    validations

    validation rules

  11. case class OnlyKeyParamDefinition(key: String) extends ParamDefinition with Product with Serializable

    Key param definition.

    Key param definition.

    key

    key

  12. sealed trait ParamDefinition extends AnyRef

    Param definition.

  13. trait ParamValueTypeConverter[S, T] extends AnyRef

    Type converter

    Type converter

    S

    from

    T

    to

    Annotations
    @implicitNotFound( ... )
  14. sealed trait Parameters extends AnyRef

    Params

  15. case class ParametersFromMap(map: Map[String, Any]) extends Parameters with ParametersGetAsImplicits with Product with Serializable

    Params from a Map value.

    Params from a Map value.

    map

    Map value

  16. case class ParametersFromValidations(validations: Validations) extends Parameters with ParametersGetAsImplicits with Product with Serializable

    Params from validations.

    Params from validations.

    validations

    validations

  17. sealed trait ResultsProjection[+A] extends AnyRef

    Results projection.

    Results projection.

    A

    result type

  18. case class SuccessesProjection[+A](results: Validations, onSuccess: (Parameters) ⇒ A, onFailures: (Parameters, Errors) ⇒ A) extends ResultsProjection[A] with Product with Serializable

    Successes projection.

    Successes projection.

    A

    result type

    results

    results

    onSuccess

    success event handler

    onFailures

    failure event handler

  19. case class ValidationFailure(paramDef: ParamDefinition, errors: Seq[Error]) extends ValidationState with Product with Serializable

    Failure.

    Failure.

    paramDef

    param definition

    errors

    errors

  20. trait ValidationRule extends (KeyValueParamDefinition) ⇒ ValidationState with ErrorLike

    Validation rule.

  21. sealed trait ValidationState extends AnyRef

    Validation object which has param definition and validation results

  22. case class ValidationSuccess(paramDef: ParamDefinition) extends ValidationState with Product with Serializable

    Success.

    Success.

    paramDef

    param definition

  23. trait Validations extends AnyRef

    Validations container.

  24. class Validator extends ValidatorLike

    Validator.

  25. trait ValidatorLike extends AnyRef

    Validator like feature.

  26. case class doubleMaxValue(max: Double) extends ValidationRule with Product with Serializable

  27. case class doubleMinMaxValue(min: Double, max: Double) extends ValidationRule with Product with Serializable

  28. case class doubleMinValue(min: Double) extends ValidationRule with Product with Serializable

  29. case class floatMaxValue(max: Float) extends ValidationRule with Product with Serializable

  30. case class floatMinMaxValue(min: Float, max: Float) extends ValidationRule with Product with Serializable

  31. case class floatMinValue(min: Float) extends ValidationRule with Product with Serializable

  32. case class intMaxValue(max: Int) extends ValidationRule with Product with Serializable

  33. case class intMinMaxValue(min: Int, max: Int) extends ValidationRule with Product with Serializable

  34. case class intMinValue(min: Int) extends ValidationRule with Product with Serializable

  35. case class length(len: Int) extends ValidationRule with Product with Serializable

  36. case class longMaxValue(max: Long) extends ValidationRule with Product with Serializable

  37. case class longMinMaxValue(min: Long, max: Long) extends ValidationRule with Product with Serializable

  38. case class longMinValue(min: Long) extends ValidationRule with Product with Serializable

  39. case class maxLength(max: Int) extends ValidationRule with Product with Serializable

  40. case class minLength(min: Int) extends ValidationRule with Product with Serializable

  41. case class minMaxLength(min: Int, max: Int) extends ValidationRule with Product with Serializable

  42. case class notEmpty(trim: Boolean = true) extends ValidationRule with Product with Serializable

  43. case class required(trim: Boolean = true) extends ValidationRule with Product with Serializable

  44. type SimpleError = Error

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.8) Use Error instead.

Value Members

  1. object Error extends Serializable

    Factory

  2. object Messages

    Messages loader.

  3. object ResultsProjection

    Results projection.

  4. object Validations

    Validations factory.

  5. object Validator

    Validator factory.

  6. def checkAll(validationRules: ValidationRule*): ValidationRule

    Converts validation rules to a combined validation rule which verify all the rules even if some of them has errors.

    Converts validation rules to a combined validation rule which verify all the rules even if some of them has errors.

    validationRules

    validation rules

    returns

    validation rule

  7. implicit def convertParamDefinitionToParamDefinitionWithIs(paramDef: ParamDefinition): ParamDefinitionWithIsDSL

    Converts ParamDefinition to ParamDefinitionWithIsDSL implicitly.

    Converts ParamDefinition to ParamDefinitionWithIsDSL implicitly.

    paramDef

    param definition

    returns

    with dsl

  8. object dateFormat extends ValidationRule

  9. object dateTimeFormat extends ValidationRule

  10. object doubleValue extends ValidationRule

  11. object email extends ValidationRule

  12. object floatValue extends ValidationRule

  13. object future extends ValidationRule

  14. package implicits

  15. object intValue extends ValidationRule

  16. object longValue extends ValidationRule

  17. object notEmpty extends notEmpty

  18. object notNull extends ValidationRule

    Built-in validation rules.

  19. object numeric extends ValidationRule

  20. def param(kv: (String, Any)): KeyValueParamDefinition

    Accepts key and value.

    Accepts key and value.

    kv

    key and value

    returns

    param definition

  21. def paramKey(name: String): OnlyKeyParamDefinition

    Accepts key.

    Accepts key.

    name

    key

    returns

    param definition

  22. object past extends ValidationRule

  23. object required extends required

  24. object same extends ValidationRule

  25. object timeFormat extends ValidationRule

Inherited from AnyRef

Inherited from Any

Ungrouped