Package

skinny

validator

Permalink

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
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    Simple implementation of Error.

  2. trait ErrorLike extends AnyRef

    Permalink

    Validation error.

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

    Permalink

    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

    Permalink

    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

    Permalink

    Form object.

    Form object.

    A

    raw value type

    validations

    validations

    value

    value if exists

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

    Permalink

    Key for skinny.I18n messages.

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

    Permalink

    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

    Permalink

    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

    Permalink

    Messages for validation errors.

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

    Permalink

    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

    Permalink

    Key param definition.

    Key param definition.

    key

    key

  12. sealed trait ParamDefinition extends AnyRef

    Permalink

    Param definition.

  13. trait ParamValueTypeConverter[S, T] extends AnyRef

    Permalink

    Type converter

    Type converter

    S

    from

    T

    to

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

    Permalink

    Params

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

    Permalink

    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

    Permalink

    Params from validations.

    Params from validations.

    validations

    validations

  17. sealed trait ResultsProjection[+A] extends AnyRef

    Permalink

    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

    Permalink

    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

    Permalink

    Failure.

    Failure.

    paramDef

    param definition

    errors

    errors

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

    Permalink

    Validation rule.

  21. sealed trait ValidationState extends AnyRef

    Permalink

    Validation object which has param definition and validation results

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

    Permalink

    Success.

    Success.

    paramDef

    param definition

  23. trait Validations extends AnyRef

    Permalink

    Validations container.

  24. class Validator extends ValidatorLike

    Permalink

    Validator.

  25. trait ValidatorLike extends AnyRef

    Permalink

    Validator like feature.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink

Value Members

  1. object Error extends Serializable

    Permalink

    Factory

  2. object Messages

    Permalink

    Messages loader.

  3. object ResultsProjection

    Permalink

    Results projection.

  4. object Validations

    Permalink

    Validations factory.

  5. object Validator

    Permalink

    Validator factory.

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

    Permalink

    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

    Permalink

    Converts ParamDefinition to ParamDefinitionWithIsDSL implicitly.

    Converts ParamDefinition to ParamDefinitionWithIsDSL implicitly.

    paramDef

    param definition

    returns

    with dsl

  8. object dateFormat extends ValidationRule

    Permalink
  9. object dateTimeFormat extends ValidationRule

    Permalink
  10. object doubleValue extends ValidationRule

    Permalink
  11. object email extends ValidationRule

    Permalink
  12. object floatValue extends ValidationRule

    Permalink
  13. object future extends ValidationRule

    Permalink
  14. package implicits

    Permalink
  15. object intValue extends ValidationRule

    Permalink
  16. object longValue extends ValidationRule

    Permalink
  17. object notEmpty extends notEmpty

    Permalink
  18. object notNull extends ValidationRule

    Permalink

    Built-in validation rules.

  19. object numeric extends ValidationRule

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

    Permalink

    Accepts key and value.

    Accepts key and value.

    kv

    key and value

    returns

    param definition

  21. def paramKey(name: String): OnlyKeyParamDefinition

    Permalink

    Accepts key.

    Accepts key.

    name

    key

    returns

    param definition

  22. object past extends ValidationRule

    Permalink
  23. object required extends required

    Permalink
  24. object same extends ValidationRule

    Permalink
  25. object timeFormat extends ValidationRule

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped